Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with messages blocks #112

Closed
martijnriemersma opened this issue Mar 22, 2013 · 7 comments
Closed

Problem with messages blocks #112

martijnriemersma opened this issue Mar 22, 2013 · 7 comments

Comments

@martijnriemersma
Copy link

We are using Magento Enterprise 1.10 with the latest Varnish version. We have encoutered some problems with the message blocks:

The messageblock loads a ajax message block with
<ul id="admin_messages"></ul>
The content is empty but on the site the block is visible because of the default margin on ul's.

On a product page when a review is placed varnish loads the succes message in the block. The response from ajax is
<ul id="admin_messages">Your review has been accepted for moderation</ul>
here the li is missing.

Also the class messages is missing. The problem here is that the ajax message block doesnt have the right styling and the li is missing.

Hope someone can help us out.

On the home page, the turpentine messages block looks like this:

<script type="text/javascript">
new Ajax.Updater(
    "turpentine-esi-block-a544bb510c8c7904c7645ecb1cea38126c79573a60b62f88958c3f26aacaf602",
    "http://cache.domains.nl/turpentine/esi/getBlock/method/ajax/access/private/ttl/0/hmac/2f7e516b84392f834cdcb28d6b30ec719b7707bcb0327477af63b8ff1f7f7392/data/omKevVpc4f6W3bCBvPYfpBvhR3fyeBoQFGB0hBaZlWiWBXdFkT91PivsY5nx78WlJ0s.Dbm-x69fVOHERpETn.eU3BgNwtKdpwxcw3i5j5R6Yd0OL1xpqO2EMelcZ9nILlnlXevm4sRNNqAlW9jVZUjEEJ-I2TZy63avZDTaWllRioa9qQkA71gEjFeef9YB8FcAt7aEEbtof3q2tLTGqUmBWvVRo2RbRG7kOtG5Zj07BTXja2cOAH-noSP1jEdj4yYqoevOVQh.Ac4.mQD5Z2XGpobfB-VH3NULKFqod8yfE2n5hOXjYs3WXL162AaQ-NfAq3eZnkBY.hk9ZyiS.BvJA69ArLaM/",
    {
        method: "get",
        evalScripts: true,
        onSuccess: function(transport) {
            block = "turpentine-esi-block-a544bb510c8c7904c7645ecb1cea38126c79573a60b62f88958c3f26aacaf602";


                $("turpentine-esi-block-a544bb510c8c7904c7645ecb1cea38126c79573a60b62f88958c3f26aacaf602").appear({
                    duration: 0.3
                });

        }
    }
);
</script>
@aheadley
Copy link
Contributor

Turpentine doesn't currently support Magento EE 1.10, and I haven't tested it on that version at all. That said, I will try to find some time to get EE 1.10 installed and look into this.

@Gorkyman
Copy link

This is not a Nexcess Turpentine issue, but rather a bug in Magento core (CE and EE both have the same bug).

@@ -213,7 +213,7 @@ class Mage_Core_Block_Messages extends Mage_Core_Block_Template
         $html = '<' . $this->_messagesFirstLevelTagName . ' id="admin_messages">';
         foreach ($this->getMessages($type) as $message) {
             $html.= '<' . $this->_messagesSecondLevelTagName . ' class="'.$message->getType().'-msg">'
-                . ($this->_escapeMessageFlag) ? $this->htmlEscape($message->getText()) : $message->getText()
+                . ( ($this->_escapeMessageFlag) ? $this->htmlEscape($message->getText()) : $message->getText() )
                 . '</' . $this->_messagesSecondLevelTagName . '>';
         }
         $html .= '</' . $this->_messagesFirstLevelTagName . '>';

@gondo
Copy link

gondo commented Apr 1, 2013

hi,
did you reported this to Magento?
if its a bug it should be fixed

@aheadley
Copy link
Contributor

aheadley commented Apr 3, 2013

@Gorkyman Thanks for the info, closing this since it's not a bug in Turpentine.

@aheadley aheadley closed this as completed Apr 3, 2013
@ptz0n
Copy link

ptz0n commented Apr 12, 2013

FYI: Fix added to the Magento 2 tree.

@chevli
Copy link

chevli commented Jun 5, 2015

Hi
This still seems to be a particular Turpentine issue.

A review submission success message should not be a id="admin_messages" message as it is happening on the frontend.

After a bit of investigation it looks as though Mage::getSingleton('core/session')->addSuccess('message') resolves to the getHtml() instead of getGroupedHtml() which has the correct markup for frontend based messages. Simply changing the singleton session reference from 'core/session' to 'checkout/session' (as an example) provides the correct markup.

The call stack shows that the turpentine module is directing these messages to the wrong method.

@ADDISON74
Copy link

I agree @chevli. Even you correct that Magento core file some pages are not showing error message correctly. For example Order and Returns. It still shows admin_messages. As I understand there is a place to add helpers or something in Magento for messages. But I not such advanced to point it. In this case adding 'sales' could work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants