Page 1 of 2

2.5.0: No new StaticPages can be created [SOLVED]

Posted: Wed Jul 09, 2025 9:12 am
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 31356 times
Creating normal entries works.

Using PHP 8.3.10 .
Any solution? Is it still a PHP 8.2+ problem?

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

Posted: Wed Jul 09, 2025 12:13 pm
by onli
So it works with a different static page template?

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

Posted: Fri Jul 11, 2025 1:05 pm
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 ...??

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

Posted: Fri Jul 11, 2025 2:20 pm
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?

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

Posted: Fri Jul 11, 2025 2:47 pm
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).

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

Posted: Mon Jul 14, 2025 8:33 am
by onli
Given the solved/unsolved switch, please don't forget to check the log. A error message might help a lot.

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

Posted: Wed Jul 16, 2025 9:32 am
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

Re: 2.5.0: No new StaticPages can be created

Posted: Wed Jul 16, 2025 4:12 pm
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.

Re: 2.5.0: No new StaticPages can be created

Posted: Fri Jul 18, 2025 9:51 am
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).

Re: 2.5.0: No new StaticPages can be created

Posted: Fri Jul 18, 2025 7:59 pm
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?

Re: 2.5.0: No new StaticPages can be created

Posted: Mon Jul 21, 2025 9:21 am
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

Re: 2.5.0: No new StaticPages can be created

Posted: Tue Jul 22, 2025 3:09 pm
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.

Re: 2.5.0: No new StaticPages can be created

Posted: Tue Jul 22, 2025 3:48 pm
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.

Re: 2.5.0: No new StaticPages can be created

Posted: Wed Jul 23, 2025 8:24 am
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..

Re: 2.5.0: No new StaticPages can be created

Posted: Wed Jul 23, 2025 8:27 am
by onli
Can you try it in a different browser? When there is no PHP error it has to be a cache issue.