2.5.0: No new StaticPages can be created [SOLVED]

Found a bug? Tell us!!
Huhu
Regular
Posts: 190
Joined: Tue Oct 04, 2011 3:22 pm

2.5.0: No new StaticPages can be created [SOLVED]

Post by Huhu »

EDIT NOT SOLVED: the problem has turned up again, when I tried to edit Static Pages which I created when it worked.
EDIT SOLVED: Seems to have been an issue with the Simple Template chosen. All fields works.


Hi!
Using a fresh installation of s9y 2.5.0, after installing Staticpage Plugin (as well as the Staticpage sidebar plugin to be sure) ...
... as Admin in the backend, clicking "Static Pages" -> (Dropdown "New Entry") Go! -> I end up at the same page again, but missing the layout.
Screenshot 2025-07-09 at 09.06.12.jpg
Screenshot 2025-07-09 at 09.06.12.jpg (54.51 KiB) Viewed 31294 times
Creating normal entries works.

Using PHP 8.3.10 .
Any solution? Is it still a PHP 8.2+ problem?
Last edited by Huhu on Sun Jul 27, 2025 6:49 pm, edited 3 times in total.
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.5.0: No new StaticPages can be created // SOLVED

Post by onli »

So it works with a different static page template?
Huhu
Regular
Posts: 190
Joined: Tue Oct 04, 2011 3:22 pm

Re: 2.5.0: No new StaticPages can be created // NOT SOLVED

Post by Huhu »

Hi!
It did work when I posted the Edit. So I created a bunch of static pages.
Today, when I tried to edit them, I got the same error -- this time no matter whether I set the "Simple" or "All fields" setting.

BUT: I now created a New Static Page with "All Fields" enabled. That did work. When I then switched back to the SP overview, I suddenly could edit the SPs again.
So this looks like some kind of cookie or session issue, but I am lost why.

Errr ...??
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.5.0: No new StaticPages can be created // NOT SOLVED

Post by onli »

Hm, then let's investigate. But I can't reproduce it here. Is there something in the PHP error log for the moments the statig page editor breaks like this? Alternatively, is there an error message at https://YOURURL/serendipity_admin.css?v=123, as it is linked in the head of the backend html?
Huhu
Regular
Posts: 190
Joined: Tue Oct 04, 2011 3:22 pm

Re: 2.5.0: No new StaticPages can be created // NOT SOLVED

Post by Huhu »

I'll check, thanks!
By the way, I have the same issue with the Stickies Plug-In (yet that dosen't work at all since no template can be selected).
Also, I posted in another thread that the Frontpage setting for Static Pages is suddenly inoperative (see there).
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.5.0: No new StaticPages can be created // NOT SOLVED

Post by onli »

Given the solved/unsolved switch, please don't forget to check the log. A error message might help a lot.
Huhu
Regular
Posts: 190
Joined: Tue Oct 04, 2011 3:22 pm

Re: 2.5.0: No new StaticPages can be created // NOT SOLVED

Post by Huhu »

Sorry for returning late!
And sorry again, I simply can't find a file with that name – though it is linked in the Clean Blog template indeed.
In serendipity.css.php, the serendipity_admin.css is mentioned:

Code: Select all

case 'serendipity_admin.css':
        // This constant is needed to properly set the template context for the backend.
        @define('IN_serendipity_admin', true);
        $css_hook = 'css_backend';
        $css_file = 'admin/style.css';
        $css_userfile = 'admin/user.css';
        break;
So I looked into the Clean Blog template and the /admin folder is missing there indeed. But the backend works in general, so the file should exist through the default/fallback solution (as expected).

Error log:

Code: Select all

AH01071: Got error 'PHP message: 
PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in 
(...)/plugins/serendipity_event_adminnotes/serendipity_event_adminnotes.php:278\nStack trace:\n#0 /var/(...)/plugins/serendipity_event_adminnotes/serendipity_event_adminnotes.php(450): serendipity_event_adminnotes->shownotes()\n#1 
/var/(...)/include/plugin_api.inc.php(1188): serendipity_event_adminnotes->event_hook('backend_sidebar...', Object(serendipity_property_bag), Array, NULL)\n#2 
/(...)/serendipity_admin.php(204): serendipity_plugin_api::hook_event('backend_sidebar...', Array)\n#3 {main}\n  
thrown in /(...)/plugins/serendipity_event_adminnotes/serendipity_event_adminnotes.php 
on line 278', referer: https://kunz-artenschutz.de/serendipity_admin.php?
serendipity[adminModule]=event_display&serendipity[adminAction]=adminnotes
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.5.0: No new StaticPages can be created

Post by onli »

No worries :) I'm not convinced that error will help with the static pages, but a fatal error during page construction does fit. https://github.com/s9y/additional_plugins/pull/199 contains the patch, are you up for testing that by copying the new plugins/serendipity_event_adminnotes/serendipity_event_adminnotes.php from Github onto your server? Should be this link: https://github.com/s9y/additional_plugi ... nnotes.php

If not that's okay and I will merge the PR as-is, then you would get the update via Spartacus. But extra testing before doing that is always good.
Huhu
Regular
Posts: 190
Joined: Tue Oct 04, 2011 3:22 pm

Re: 2.5.0: No new StaticPages can be created

Post by Huhu »

Great, thank you so much! Of course, I am up for testing.
Adminnotes:
Now it works! Your Github file did the thing.

One other issue turned up: Unter "Groups", I only get Administration" (the one I am logged in with), not Editor or one of the other groups. So it works, but it's visible only to the Admin group.
This is a minor issue compared to the staticpage problem, of course.

Static pages: Same issue as before (ofc).
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.5.0: No new StaticPages can be created

Post by onli »

Thank you, I merged the PR, so the update will be in Spartacus for all.

The static pages show the same issue though? Is there now something else in the error log when you reproduce the error?
Huhu
Regular
Posts: 190
Joined: Tue Oct 04, 2011 3:22 pm

Re: 2.5.0: No new StaticPages can be created

Post by Huhu »

Hi!
Great, good to hear that.
Just reproduced the error and I got this in the error.log:

Code: Select all

[Mon Jul 21 09:19:10.360279 2025] [proxy_fcgi:error] [pid 1219797:tid 139917057148672] [client (...)] 
 
AH01071: Got error 'PHP message: 
PHP Fatal error:  Uncaught TypeError: 
Cannot access offset of type string on string in 
(...)templates_c/clean_blog/f6/92/f7/f692f71a(...)cd85e6aeddd6d8_0.file.default_staticpage_backend.tpl.php:99\nStack trace:\n#0 (...)/bundled-libs/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): 
content_686e13b2ee68f6_10433339(Object(Smarty_Internal_Template))\n#1 /(...)/bundled-libs/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114):
 Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))\n#2 (...)/bundled-libs/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217):
 Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))\n#3 (...)/bundled-lib...', 

referer: https://(...)/serendipity_admin.php?serendipity[adminModule]=event_display&serendipity[adminAction]=staticpages
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.5.0: No new StaticPages can be created

Post by onli »

Awesome! Sadly the file at around that line has nothing obvious, it's hard to identify the source given that it is the compiled PHP from the smarty template as source. [strike]Could you follow this up? Open the file templates_c/clean_blog/f6/92/f7/f692f71a*.file.default_staticpage_backend.tpl.php and show here the line with the bug. Note that the file and its path might have already changed.[/strike]I'm on it, I see the bug. No need to debug more.

Though I just notice that the clean_blog theme has its custom default_staticpage_backend.tpl - will check whether I can reproduce the bug with that.
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.5.0: No new StaticPages can be created

Post by onli »

Okay, got it. https://github.com/s9y/Serendipity/pull/908 is the patch, templates/clean-blog/backend_templates/default_staticpage_backend.tpl
is the file to replace. https://raw.githubusercontent.com/s9y/S ... ackend.tpl should be the link. Would be great again if you could test this - the patch would only arrive at the blog with the next release.
Huhu
Regular
Posts: 190
Joined: Tue Oct 04, 2011 3:22 pm

Re: 2.5.0: No new StaticPages can be created

Post by Huhu »

Thanks so much for your swift reaction!
I replaced the file with your version. Sadly, the error remains – yet strangely, the general server error.log is empty and the domain's error.log doesn't show a related error either.

I emptied the template cache through Maintenance as well to be sure.

The f7 file is included here, but hasn't changed since 9th of July..
Attachments
f692f71aca2091eetc.file.default_staticpage_backend.tpl.php.txt
(28.86 KiB) Downloaded 430 times
Last edited by Huhu on Wed Jul 23, 2025 8:32 am, edited 1 time in total.
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
onli
Regular
Posts: 3044
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2.5.0: No new StaticPages can be created

Post by onli »

Can you try it in a different browser? When there is no PHP error it has to be a cache issue.
Post Reply