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.

The old 'unexpected T_ENDIF' problem - and I can't find the error

July 18, 2008 3:34pm

Subscribe [3]
  • #1 / Jul 18, 2008 3:34pm

    UteGerhardt

    15 posts

    Hi all!

    As the title of this thread already tells you, I’m having a problem with the display of some of my archives. Not all of them, mind you. Some of them turn up just fine, some of them throw this at me instead:

    Parse error: syntax error, unexpected T_ENDIF in .../core/core.functions.php(637) : eval()'d code on line 275

    I’m using ExpressionEngine 1.6.3, Build 20080421, and my blog is at http://zickenterror.koberstein.org. Try navigating to the last page for instance - no luck. Nor with some of the monthly archives

    For some months, I’ve been able to single out one or more entries that seem to be responsible for the problem. Closing them repairs the page - for whatever reason. The entries look fine to me both in a browser as well as in the database. For other pages, I simply cannot find out what’s wrong. There’s no stray {/if} in any of my templates, as far as I can tell. (Come to think of it: Why else would some pages render correctly while others won’t, using the same table? Can’t be the template in that case, I guess.)

    Does anyone have an idea what I could do, short of re-writing all the entries in question?

    Thanks and have a nice weekend!

    Ute

  • #2 / Jul 18, 2008 3:41pm

    mweichert

    68 posts

    Is there a } in the entry that is causing problems?

  • #3 / Jul 18, 2008 3:54pm

    UteGerhardt

    15 posts

    Nope, afraid not. Just normal characters.

  • #4 / Jul 18, 2008 4:53pm

    Ingmar

    29245 posts

    Can you identify an entry that’s causing problems?

  • #5 / Jul 18, 2008 5:11pm

    UteGerhardt

    15 posts

    Yep. One of them is Entry ID 3342 (currently closed) from July 2000. As soon as I re-open it, the archive for that month gets ruined. This is the actual content:

    Tja, mit wem redet man, wenn niemand da ist? Richtig, mit dem Tagebuch. Es ist mitten in der Nacht, eigentlich sollte ich längst schlafen, aber das funktioniert sowieso nicht. Wie ich es mir schon dachte, wird aus dem Trip nach Liverpool am Donnerstag wohl nichts werden. Zweimal hatte ich P. letzte Woche gefragt, ob seine Einladung noch gilt oder nicht. Donnerstag hat er dann hier angerufen und eine Nachricht hinterlassen, er sei am Wochenende in Deutschland, so daß wir telefonieren könnten. Er würde noch einmal anrufen. Daß das nicht geschehen ist, muß ich wohl nicht weiter erwähnen. Daß ich blöd genug war, ihm die selbe Frage zum dritten Mal (per SMS) zu schicken, wohl auch nicht. Und erst recht nicht, daß auch darauf keine Antwort erfolgt ist. Wobei hier wohl zweifellos der alte Spruch zum Tragen kommt, keine Antwort sei auch eine Antwort.
    
    Daß man eine Einladung aus irgendwelchen Gründen absagen will oder muß, kann vorkommen. Aber dann muß die Absage auch ausgesprochen werden, verdammt noch mal! Wenigstens das ist er mir schuldig, schließlich muß ich auch planen! Und es muß ihm ja wohl klar sein, daß ich jetzt 300,- DM für den Flug in den Sand gesetzt habe! Davon sollte ich ihm eigentlich die Rechnung schicken… Wieso hat er nicht am Donnerstag schon auf der Mailbox gesagt, was Sache ist? Ist es nun Feigheit oder Gleichgültigkeit? Und wie konnte es so weit kommen, daß P. meint, mich derart behandeln zu können?

    Guess it can’t be the umlaut characters, as the other entries contain loads of those as well.

  • #6 / Jul 18, 2008 5:25pm

    UteGerhardt

    15 posts

    I just published another entry (ID 3915) with the exact same content, date and title. All that’s different is the time stamp. It shows up perfectly fine. Weird.

  • #7 / Jul 18, 2008 5:28pm

    Ingmar

    29245 posts

    Can you simply try to resave that entry? Open it in the CP, then save again. Does that change anything?

  • #8 / Jul 18, 2008 5:56pm

    UteGerhardt

    15 posts

    Good idea, thank you. 😊 However, that was about the first thing I did, as I reckoned that the import from pMachine pro might have messed things up. It doesn’t make any difference, though.

  • #9 / Jul 19, 2008 9:59am

    mweichert

    68 posts

    Maybe do a comparison between the rendered HTML of each entry. Could be an issue with HTML escaping. *shrugs*

  • #10 / Jul 19, 2008 1:05pm

    UteGerhardt

    15 posts

    Unfortunately, I can’t see the rendered HTML of the first entry, though. All I get is the error message. Without debugging, there is no code at all.

    Guess I’ll simply have to re-write all the entries in question. 😕

  • #11 / Jul 19, 2008 3:40pm

    Lisa Wess

    20502 posts

    These errors are almost always caused by incorrect conditionals in your actual template; it probably isn’t entry specific to that entry’s content.  You might reduction test your template and see what line of code causes that error.

  • #12 / Jul 19, 2008 4:18pm

    UteGerhardt

    15 posts

    No stray /if, but… OK, kick me if you like:

  • #13 / Jul 19, 2008 4:21pm

    UteGerhardt

    15 posts

    Still beats me, though, why most archives remained unaffected and only some showed the error.  ❓

  • #14 / Jul 20, 2008 11:51am

    Robin Sowell

    13255 posts

    LOL- yep, that would do it.  And I suspect some were affected and others not because they differed on what was coming out of the categories tag pair.  Er- I swear that makes sense!

    Otherwise- we good to close this one out?

  • #15 / Jul 20, 2008 3:02pm

    UteGerhardt

    15 posts

    Sure. 😊 Thanks for all your help! 😊

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

ExpressionEngine News!

#eecms, #events, #releases