All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Low variables not parsing on error response/system message pages

carlosperez 6 Mar 2012 21:18 problem, complete

When I use low variables in place of snippets that appear on error response pages (for example on a form page with inline error handling turned on), if an error occurs, the low variables don't parse at all.

Is this expected due to parse order? I've tried setting parse order to early and not, but it doesn't seem to make any difference.

I was running into this on system messages as well, my only solution was to revert back to embeds or snippets.

Replies

  1. Low 6 Mar 2012 21:36

    I think this has to do with the session_end hook not being called on those pages, so the vars cannot be added to the Snippets array. I will try and confirm with EllisLab...

  2. carlosperez 14 Mar 2012 12:24

    Thanks - hopefully it's something that can be addressed!

  3. carlosperez 2 Apr 2012 13:44

    Just wondering if you've had any luck with this?

  4. Low 2 Apr 2012 13:49

    I don't think there's much I can do about the sessions_end hook not being called in some cases.

    What I have done, is move the adding of the early parsed vars to a different hook, which is available in EE 2.4.0+. This should help with your issue, but I need to do a bit more testing. You can always try the latest version and see if that helps your issue.

  5. Low 2 Apr 2012 13:57

    By the way, I presume you don't mean the stand-alone User Messages, where only the variables {title} {meta_refresh} {heading} {content} {link} are available, right?

  6. carlosperez 2 Apr 2012 14:02

    Actually - I think that is where it is happening. I'm using Custom System Messages for those templates, but didn't know LV wouldn't parse at all though.

  7. Low 2 Apr 2012 14:05

    If you're using CSM, then the new hook might get triggered. I'll check if that's the case.

    It does work for comment preview pages. The same thing happens there -- the sessions_end hook is not called, thus not adding the variables to the native Snippets array. Calling the new template_fetch_template hook available in EE 2.4.0+ solves it in that case.

  8. carlosperez 2 Apr 2012 14:10

    Sorry, I had forgotten a bit about the problem, so I had to go check it out to refresh my memory. The low variable itself gets parsed, however, the contents of the variable do not. For example, I have a an if statement in the low variable being called and the "{if blah == blah}" tags actually show up in the browser.

  9. Low 2 Apr 2012 14:14

    What version of EE and LV are you using now? If you could, try and update both to the latest version.

    I just did a test using CSM (submitting an empty comment form, triggering the error) and the early parsed vars seem to be working there.

  10. carlosperez 2 Apr 2012 14:15

    Using both ee2.3 and ee2.4 with lv 2.1 (two different environments)

  11. Low 2 Apr 2012 14:17

    Okay, so, the issue should be fixed for anything EE 2.4+ and LV 2.1+. For anything older, the software should be updated.

    Can you confirm if the issue persists?

  12. carlosperez 2 Apr 2012 14:21

    EE2.4 + LV2.1.1 seems to be working. Sorry about that. Thanks!

  13. Low 2 Apr 2012 14:22

    Great news! :)