Upgrade attempt: Fail, Fail, Fail

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
schlartibardfast
Posts: 8
Joined: Thu Jun 13, 2024 2:28 pm

Upgrade attempt: Fail, Fail, Fail

Post by schlartibardfast » Sat Dec 20, 2025 5:02 pm

I've been running FlatPress v1.2.1 on a Raspberrt Pi for quite a few years. Works well if you don't mind hand editing statics when the inbuilt edit fails.

I thought I'd try to upgrade to v1.4. Ha ha. I managed to get it installed OK but discovered I can't "just" copy over the old content - Server Error 500.
So I thought maybe I'd try successive upgrades: 1.2->1.31 etc.

The Wiki says
Upgrading to FlatPress 1.3 or below
For older versions, please follow the update instructions of the release you wish to upgrade to.

Which takes me to the release page, which says "Update package from 1.2 to 1.3.1: 12to131.zip". OK, got that. And it helpfully says "You find update instructions on the FlatPress download page". Which says

"Update from prior versions
Our wiki has detailed update instructions and the download links of update packages. Happy updating!" and completes the loop back to the Wiky page I started at :(

So I tried an upgrade per the instructions "From FlatPress 1.3 "Andante" or FlatPress 1.3.1" but that didn't work. I know that folks will say "You need to describe exactly what error you are seeing" - but, over the last two days, I've seen so many ways for this to fail that I've lost all track. I've also explored the "How to rework your themes and plugins for FlatPress ≥ 1.3 / Smarty 4" wiki on the basis that this might have something to do with it. This however reads (to me, as a hardware bloke with reasonable software hacking skills) as "you need to debug all our code". Which would be nearly OK if it was documented, but it doesn't seem to be. I can't even find the specification of how a design a theme.

So, for now I'm giving up. It stays as v1.2.1. Which is a pity, this is a great package but "just too difficult" if you run into problems.

If anyone has a simple way of upgrading a 1.2.1 install, with content including a slightly modified theme, to the current release* I'd welcome a clue :-)

*That's if there is any good reason for even doing this of course?

User avatar
fraenkiman
Posts: 470
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: Upgrade attempt: Fail, Fail, Fail

Post by fraenkiman » Sat Dec 20, 2025 8:56 pm

Hello schlartibardfast,
schlartibardfast wrote: Sat Dec 20, 2025 5:02 pm ... a slightly modified theme, to the current release* I'd welcome a clue :-)
This will not work due to your modified theme in FP 1.2.1.
FP 1.2.1 still used the Smarty engine 2.6.
or
  • use the standard Leggero-Theme from FP 1.4.1
or
Best regards,
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

schlartibardfast
Posts: 8
Joined: Thu Jun 13, 2024 2:28 pm

Re: Upgrade attempt: Fail, Fail, Fail

Post by schlartibardfast » Sat Dec 20, 2025 10:00 pm

Thing is that:
is just the page that basically says I need to debug some undocumented mess of code.

Also, I tried an install of 1.5 RC1 just to see if that worked. Installed, setup OK. Login OK to Main. Write entry with some random txt. Save. Click manage entries -> HTTP ERROR 500.

This thing is just broken :-(((

User avatar
fraenkiman
Posts: 470
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: Upgrade attempt: Fail, Fail, Fail

Post by fraenkiman » Sun Dec 21, 2025 12:01 am

Hello schlartibardfast,

this procedure may get you to your goal more quickly:

1.) Create a backup of the directories

Code: Select all

fp-content/attachs/
fp-content/content/
fp-content/images/
fp-interface/themes/
(without the Leggero theme)

2.) Install a fresh instance of FlatPress 1.5 RC1
3.) Copy the directories

Code: Select all

fp-content/attachs/
fp-content/content/
fp-content/images/
fp-interface/themes/
from the backup to the fresh instance.

4.) Log in to the admin area
and rebuild the index in the maintenance menu.

Everything should work smoothly up to this point, including creating a new entry, etc.

Now you could change the theme in the admin area, but you run the risk of seeing error 500 again.

If you want to continue using your theme, you will have no choice but to modernize it. The step of using a newer Smarty engine was necessary to support PHP 8.0+. Follow eagleman's footsteps. He already has experience and can migrate your theme to Smarty 4 +.

Alternatively, pack your theme into a ZIP archive and post it here. I'll take a look at it when I get a chance.

I would copy your own, possibly outdated plugins into the new instance at the very end and activate them step by step.

Best regards,
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

schlartibardfast
Posts: 8
Joined: Thu Jun 13, 2024 2:28 pm

Re: Upgrade attempt: Fail, Fail, Fail

Post by schlartibardfast » Sun Dec 21, 2025 8:27 pm

Thank very much for the reply :-)

I've now invested another day of my life and can report the following (some of which I guess is release candidate testing):

It appears that this simply no longer works on a Raspvery Pi (all permissions 777 and PHP Version 7.3.31-1~deb10u1) - see later. As a test I made a new install at my hosting company's server.

I used your suggestion of a clean install and then copying over content, excluding the theme (which was based on pivotx-en rather than Leggero) and then rebuilding the index.

This kind-of worked, with the flowing issues:

1) although entries show on blog, clicking an entry gives:
Not Found
Sorry, we could not find the page you requested

Solution: edit each entry, save & continue
I did this for the first few entries ... but for some unknown reason this resolved itself during the course of the day without any apparent input on my part.

2) .webm videos don't play any more (used to in v1.2.1)
Solution needed to change paths from /path/ to ../path

3) Formatting text in blog subtitle in General Settings no longer works i.e. you can't change formatting by <i> </i> (or )
bbcode renders as [ i]The LSAS blog[ /i], html renders as <i>The LSAS blog</i>
same with e.g. [h1] [/h1]
No biggie, can live with that.

4) static editor (still !!!) does not save changes. Has Publish and Preview buttons but no Save. The only way I've found to edit is to text edit the /fp-content/content/static/ files.
Is this just me? and why?

5) Widgets not working properly. E.G. plugin for SearchBox enabled and dragged into right bar does not appear at right. If any avaivable widgets dragged to Left or top bar does not show at all. Only the BlockParser: menu works. IIRC this was always a bit flaky but I cant remember how I worked round it.

I made a modified theme based on one of the Leggero variants:

- Modified fp-interface/themes/common.css to make header
- Modified column.css to change color of right menu bar text
- Modified themes/leggero/entry-default.tpl to remove posting time

Having got this all approximately working I then copied the whole directory structure to the Pi (Linux raspberrypi 5.10.17+ #1414 Fri Apr 30 13:16:27 BST 2021 armv6l GNU/Linux). The result was HTTP ERROR 500.

Previously I had copied the working Pi v1.2.1 install to the hosting company's server and this worked fine. So I conclude that rc1.5 is broken as far as Pi goes. Dunno why. It worked nicely on the old version, tiny little thing hanging from my wall and happily serving http requests on my fixed IP4 address. I was planning to retire it next year when I probably want to move from Plusnet (and it doesn't do https) but it would have been nice not to have all this hassle in the mean-time :-(

Further comment on documentation:

The only "Documentation" I've found was e.g line 1171 in admin.css

"/* (already defined in common, here we put just some tuning settings) */"

and line 796-799

/*
with display:block on the main-cell link, let's disable this
padding: .9em;
*/

plus section headers

column.css
/* =======================================================
The following definitions take care of the Calendar plugin
======================================================= */

That's all you get. There doesn't seem to be anything beyond that. No specification or description of what this mess of code is meant to do or how.

Was this ***really*** developed by a bunch of hackers who just had this all in their heads? That you suggest that the solution to my theme issues would be to "Follow eagleman's footsteps" suggests that this could well be so :-(

Anyway, should anyone want to have a fiddle, the installs (old v1.2.1 and new rc1.5) on mythic-beasts server are here:
Old = https://www.lsas.uk/flatpress/
New = https://www.lsas.uk/flatpress2/

Login for the new version should you wish to tinker is flatpress15rc1_user flatpress15rc1_password

The same installs on the pi are at:
Old = http://lsas.co.uk/flatpress/
New = http://lsas.co.uk/flatpress2/

The new giving:
This page isn’t working
lsas.co.uk is currently unable to handle this request.
HTTP ERROR 500

Anyway, thanks again for the help.

Kind Regards & Happy Christmas :-)

schlartibardfast
Posts: 8
Joined: Thu Jun 13, 2024 2:28 pm

Re: Upgrade attempt: Fail, Fail, Fail

Post by schlartibardfast » Sun Dec 21, 2025 9:08 pm

Update:

Having reported that widgets weren't working, I came back to the rc1.5 install and there they were, working! It just healed up on being left alone for a while. Eeeh Wot???

Perplexed ! Maybe a caching issue?

User avatar
fraenkiman
Posts: 470
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: Upgrade attempt: Fail, Fail, Fail

Post by fraenkiman » Sun Dec 21, 2025 10:13 pm

schlartibardfast wrote: Sun Dec 21, 2025 8:27 pm 4) static editor (still !!!) does not save changes. Has Publish and Preview buttons but no Save. The only way I've found to edit is to text edit the /fp-content/content/static/ files.
Is this just me? and why?
Publish = Save. As you saw, saving worked well for me.
schlartibardfast wrote: Sun Dec 21, 2025 8:27 pm 5) Widgets not working properly. E.G. plugin for SearchBox enabled and dragged into right bar does not appear at right. If any avaivable widgets dragged to Left or top bar does not show at all. Only the BlockParser: menu works. IIRC this was always a bit flaky but I cant remember how I worked round it.
This should solve the widget problem.
Screenshot 2025-12-21 230921.png
Screenshot 2025-12-21 230921.png (14.14 KiB) Viewed 302 times
If a similar problem occurs again, briefly deactivate the BBcode plugin, correct the affected page, then reactivate the BBcode plugin.

No cache problem

Best regards,
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

schlartibardfast
Posts: 8
Joined: Thu Jun 13, 2024 2:28 pm

Re: Upgrade attempt: Fail, Fail, Fail

Post by schlartibardfast » Mon Dec 29, 2025 5:38 pm

A follow up on this, in case it's of any use to someone...

First, thank you fraenkiman for your reply. It is however a mystery to me as to why adding html tags round a commented out bb code line "should solve the widget problem". Do tell! As in "give a man a fish, feed him for a day; teach a man to fish, feed him for life". And the "briefly deactivate the BBcode plugin" suggestion seems horribly reminiscent of "you need to restart Windows" ;-|

(Oh, and some of the problem was a cache issue - Ctrl+F5 made changes appear)

Second, the reason for later versions not working on the old Raspberry Pie is probably that it is a 32 bit OS. It's also running Lighttpd rather than Apache. I haven't investigated further. FP v1.4 and 1.5rc both (kind-of) work on a 64 bit Linux Mint laptop running Apache and on my web host's server.

The reason I say "kind-of" is that the whole thing is extremely brittle. Touch the wrong thing and it crashes with Server Error 500. It doesn't fail gracefully with e.g. a helpful "error in xxx.tpl - line nnn expect {something}". You have to go back to square one and reload the last working snapshot. Even then, there is one link under "Maintenance" entitled "Purge theme and templates cache" which would better be named "Destroy my blog" because that is what it does.

It is not as though I've made major changes: I've used the pivotex-en theme, replace a header.jpg with one of the same dimensions, changed the color of a few elements in the css - that kind of thing. Reading the comments too on some of the published themes show various kinds of "doesn't work". The apparent total lack of documentation is also not a good sign.

I've only persisted with this because of my existing content and because the comment notification works on the new version/server (which is a handy feature). To get to something usable I've had to creep step by step with a backup each step of the way. I've used v1.4.1 to avoid potential bleeding edge release candidate issues and now have something usable. Providing I don't want to change anything it should do...

Sorry if this comes over as critical. For me, this is not "free software" - I've spent days on this over Christmas. I'd very much like FP to be "easy and just work". There are quite a few other CMS packages, including no-database but life is too short to go on a search when FP just-about does the existing job.

Regards to all.

User avatar
fraenkiman
Posts: 470
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: Upgrade attempt: Fail, Fail, Fail

Post by fraenkiman » Tue Dec 30, 2025 1:40 am

Hi schlartibardfast,

thank you so much for taking the time to write this – and I'm sorry you had such a frustrating "Christmas debugging marathon." Criticism is absolutely fine, and this kind of feedback is really helpful.

A few points that might clarify your issue:

1) Why "HTML tags around a commented-out BBCode line" can help: FlatPress's BBCode is applied server-side to the text before it reaches the browser. An HTML comment like `<!-- ... -->` simply tells the browser not to display it. However, the BBCode parser still transforms [ url], [ list], etc., within that comment.
And yes: Temporarily disabling a plugin is not the same as "restarting Windows"—it's simply the quickest way to determine whether the error is caused by the BBCode filter chain or by the theme/template markup.

2) Ctrl+F5 / Cache A complete page reload to fix "missing changes" is quite common due to browser caching of CSS/images—so this point is covered.

3) Raspberry Pi / 32-bit / Lighttpd FlatPress itself is based on PHP, so 32-bit shouldn't be an issue in itself. In practice, it usually depends on which PHP version and extensions can run on the respective operating system and whether the web server/PHP FPM configuration has strict permissions. If you ever need to revisit this: The precise error message from the server/PHP log is the most helpful.

4) Regarding instability / the "500 Server Error" without a helpful message: You're right that an "HTTP 500" error is a very poor user experience. However, the actual error is usually a bug pointing to a different cause. The error is a serious PHP bug that only appears in the server log because display_errors is disabled in the production environment. If you share the relevant lines from the Lighttpd/PHP-FPM error logs, we can almost always simplify troubleshooting and pinpoint the exact file and line.

5) "Clear Theme and Template Cache" Feels Like "Wrecking My Blog" This button deletes files in fp-content/cache/ (including some plugin/widget caches). This should be safe – but if your configuration can't subsequently restore the cache/compiled output (permissions/ownership, read-only file system, PHP-FPM user conflict, etc.), the next request could cause a critical error, and it will appear as if the blog has disappeared.

6) Documentation/Themes "Not Working" You're right, the documentation can sometimes be hard to find. The wiki contains information on themes/plugins and instructions for upgrades (especially since Smarty has become stricter, and older themes may need to be adapted). This stricter Smarty syntax is also why some older themes are a bit sensitive after changes. If you're willing, you can help us turn this into fixes. If you post these details (or send them via PM), we can usually reproduce and fix the issue, or at least document it:
PHP version
Web server/PHP handler (Lighttpd + php-fpm?)
What action triggers the 500 error (exact click/file editing)
The error log snippet at the time of the crash; + any modified ".tpl" file (if applicable).

Again: Sorry it felt a bit shaky – and thank you for such a clear report.

Best regards,
Frank.
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests