ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

corrupted snippets?

August 21, 2011 2:48pm

Subscribe [3]
  • #1 / Aug 21, 2011 2:48pm

    janey

    2 posts

    I’ve just run into this for the second time.  The first instance caused several pages that contained PHP to stop working.  I troubleshot for hours and by chance I ended up creating a new snippet, same name with the exact code.  This fixed the issue.  So by creating a new snippet with identical code, the site starting working.  Something similair just happened.  This time the site was acting as if the snippet wasn’t created.  It just showed {snippet-name} and the logic/code within it (Javascript) did not work.  Again I renamed that snippet and then copied its contents into a new snippet with the old name.  Site started working. I had just recently updated another snippet which might be what caused this problem.  Regardless, does anyone have an idea why this is happening?

    thanks

  • #2 / Aug 22, 2011 11:42am

    Kevin Smith

    4784 posts

    HI Janey,

    Sorry to see you’re having this frustrating problem. We’re not aware of anything inherently within EE that corrupts snippets, so that’s good news. Are you able to narrow down the circumstances that are in play around the time snippets seem to go bad? Do you have any add-ons installed? (If so, list them in your response.) Are you performing any work directly on your database? (Perhaps importing, exporting, etc?)

    I don’t have a solution for you at the moment, but I’ll do my best to help you track down what’s causing this!

  • #3 / Aug 22, 2011 1:32pm

    janey

    2 posts

    I got it.  My fault.  Hard to explain but I’ll try:

    1. I had CDATA code that appeared in my “head” snippet once I went to a certain page.
    2. This CDATA code did not work on another page.
    3. By erasing and remaking the snippet I was clearing the cache.
    4. This allowed it to work on the page it wasn’t UNTIL I went to the page that called the CDATE in an if statement.
    5. I fixed this by removing the CDATA code and putting it just on the page it was required.

    Silly mistake.
    thanks for the help

  • #4 / Aug 22, 2011 11:05pm

    Dan Decker

    7338 posts

    janey,

    I’m so happy to see that you were able to sort this out for yourself. Thank you so much for sharing your solution with the Community, I’m sure it will save others some hair-pulling in the future!

    Please post a new thread if you need assistance again.

    Cheers!

  • #5 / Aug 22, 2011 11:07pm

    Dan Decker

    7338 posts

    resolving…

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases