Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2020-06-03 14:29:57
- mollygaut
- New Member
- Registered: 2020-03-11
- Posts: 5
Parse error when I access mysite.com/textpattern
I’m setting up an archive for my old Textpattern site so that I can access old articles from time to time. The front-end seems to be okay. But when I log in to access mysite.com/textpattern, here is what I see.
Parse error: Invalid body indentation level (expecting an indentation level of at least 1) in /home/customer/www/mollyg8.sg-host.com/public_html/textpattern/lib/txplib_misc.php(1826) : eval()’d code on line 60
Help?! How can I fix this so my site works?
Thanks
Molly
Offline
Re: Parse error when I access mysite.com/textpattern
mollygaut wrote #323533:
I’m setting up an archive for my old Textpattern site
When you say ‘old’, how old? Which version of Textpattern are you running please? And which version of PHP? The reason I ask is because…
Parse error: Invalid body indentation level (expecting an indentation level of at least 1)
… according to stackoverflow that implies there’s an issue with code using heredoc running under newer versions of PHP (7.3+).
Now, in very old versions of Txp (4.5.7 and earlier) all the core code was indented by one tab stop. If you’re running old versions of Txp under newer PHP, then this could be triggering the problem. The only problem with that is that I thought earlier version of Txp didn’t work on newer PHP versions at all. We were only fully compatible with PHP 7+ from Txp 4.7+.
Alternatively, it could be a plugin? What happens if you visit yoursite.com/textpattern/index.php?event=plugin
and temporarily disable admin-side plugins?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#3 2020-06-03 15:06:06
- mollygaut
- New Member
- Registered: 2020-03-11
- Posts: 5
Re: Parse error when I access mysite.com/textpattern
Ah! Thank you, Bloke! I disabled all of my plugins and I am now able to access my admin side.
Offline
Re: Parse error when I access mysite.com/textpattern
Okay cool, so see if you can find the culprit by switching them on one by one and navigating to another admin panel. Once you find the offending plugin, please let us know.
If you still need the plugin’s functionality, take a look through its code in the plugins panel for the text <<<
and when you find that, look at the letters immeditely after it. Most programmers use EOL or EOF or EOHTML or something like that.
That sequence of letters dictate what you need to search for in the code a few lines further on to denote the end of the <<<
block. If you find those letters are indented by any number of characters, delete any preceding spaces so the characters are flush left.
Save the plugin and see if that fixes it (bear in mind there may be more than one <<<
block in the plugin so you’ll need to fix them all).
Hope that helps.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#5 2020-06-03 16:53:40
- mollygaut
- New Member
- Registered: 2020-03-11
- Posts: 5
Re: Parse error when I access mysite.com/textpattern
Thank you for the tips. I am no longer actively building this site, but I spent a lot of years writing on it so I still need access to my article archives. I disabled all the plugins except chh_article_custom and it’s working fine… my brains are too scrambled to figure out which plugin so I’m gonna quit while I’m ahead. Thank you so much for your help, Bloke!
Offline