Version: 15.1.0
Theme: Elegant
Plugin: Evil_Blog
On Piwigo-URL https://pw.krasna-photo-collection.de/i … lang=en_US comes
Warning: Undefined array key "TITLE" in /data/web/1/000/033/292/103133/htdocs/piwigo/_data/templates_c/ljbwkp^3c01134410d51135835f5868e0cf983a91694907_0.file.blog.tpl.php on line 24
Warning: Attempt to read property "value" on null in /data/web/1/000/033/292/103133/htdocs/piwigo/_data/templates_c/ljbwkp^3c01134410d51135835f5868e0cf983a91694907_0.file.blog.tpl.php on line 24
The problem is only on the “News” page.
I use Language Switch for multiple languages.
What does the message want to tell me?
How can I turn this off?
Last edited by Otto_Riehl (2024-11-19 09:35:16)
Offline
The header in the Evil_Blog plugin displays:
Warning: Trying to access array offset on value of type null in /data/web/1/000/033/292/103133/htdocs/piwigo/plugins/Evil_Blog/manage.inc.php on line 75
manage.inc.php
line 75
if($FCKEA['state'] == 'active') set_fckeditor_instance($areas='post_textarea', $toolbar='Full', $width='900px', $height='200px');
What should I do?
Offline
You could try to change that line to check existence of the map key like
if (isset($FCKEA['state']) && $FCKEA['state'] == 'active') set_fckeditor_instance(...
Offline
This customization has helped in Evil Blog > Administration. The header is no longer displayed.
@erAck Thank you.
However, this has no effect on my initial problem. Described in the first post of this thread.
line 23 and 24 in the file
function content_673b3afe990819_21906468 (Smarty_Internal_Template $_smarty_tpl) {
?> <?php echo $_smarty_tpl->tpl_vars['TITLE']->value;?>Offline
Check in _data/templates_c/ljbwkp^3c01134410d51135835f5868e0cf983a91694907_0.file.blog.tpl.php from what template file it was generated, it's in the comment header, and inspect that file what might lead to TITLE being missing or add a similar isset(tpl_vars['TITLE']) conditional if you can. Yes, it's cumbersome.
Or just don't display warning messages, in local config have
$conf['show_php_errors_on_frontend'] = false;
or fine tune message classes to display, see [Forum, post 183126 by erAck in topic 31852] Menubar tags issue after 12.2.0 upgrade, or better, log to file instead.
See [Forum, post 180778 by erAck in topic 31258] Error Message.
Offline
erAck wrote:
Check in _data/templates_c/ljbwkp^3c01134410d51135835f5868e0cf983a91694907_0.file.blog.tpl.php from what template file it was generated, it's in the comment header,
The template file should be blog.tpl
/* Smarty version 4.3.1, created on 2024-11-18 14:02:54 from '/data/web/1/000/033/292/103133/htdocs/piwigo/plugins/Evil_Blog/blog.tpl' */
Ich kann den Quellcode nicht lesen. Dafür fehlt mir der Hintergrund.
---
Three out of four comments are listed, as expected.
I deleted the first comment. I fear this is the cause of the problem.
---
Switching off warning messages is not a good idea. Only those who can control the project themselves should do this. So, not me.
---
I will continue my search tomorrow.
@erAck Aber erst einmal Danke für Deinen Hinweis.
Offline
erAck wrote:
Check in _data/templates_c/ljbwkp^3c01134410d51135835f5868e0cf983a91694907_0.file.blog.tpl.php from what template file it was generated, it's in the comment header,
The template file should be blog.tpl
Smarty version 4.3.1, created on 2024-11-18 14:02:54 from '/data/web/1/000/033/292/103133/htdocs/piwigo/plugins/Evil_Blog/blog.tpl'
I can't read the source code. I don't have the background knowledge for that.
---
Three out of four comments are listed, as expected.
I deleted the first comment. I fear this is the cause of the problem.
---
Switching off warning messages is not a good idea. Only those who can control the project themselves should do this. So, not me.
---
I will continue my search tomorrow.
@erAck Aber erst einmal Danke für Deinen Hinweis.
Offline
Effort and benefit tempt me to implement your suggestion:
erAck wrote:
$conf['show_php_errors_on_frontend'] = false;
This generally disables the display of error messages on the screen.
Two additional questions to avoid this general deactivation of error messages.
The error is only displayed on this page:
https://pw.krasna-photo-collection.de/index.php?/blog Error now disabled!
1. can I restrict the display of the error message to a single page? So here /blog
2. can I suppress the selection “News” in the menu?
Last edited by Otto_Riehl (2024-11-20 11:49:11)
Offline
In a production environment I'd generally advise to log warnings/errors to file and not display at all, see my previous post.
Re 1: No.
Re 2: I don't know, I'm not using the blog plugin.
Offline
Correct:
It is bad to just suppress the display of errors, it is better to log them instead.
Code from the post from 2021-05-16 17:39:57
LocalFiles editor in the “config_default.inc.php”
ok, the error message appears in /htdocs/piwigo/_data/logs/php-error.log.
Thank you
Last edited by Otto_Riehl (2024-11-21 14:10:05)
Offline
erAck wrote:
Re 2: I don't know, I'm not using the blog plugin.
I use the Evil_Blog plugin to put information on the start page. Nothing more is planned.
Certainly I use a truck here to transport a small box.
https://pw.krasna-photo-collection.de/index.php?/blog
Is there a simpler, leaner way to do this?
Last edited by Otto_Riehl (2024-11-21 13:47:52)
Offline
Hello Otto ! You can use the PWGStuff plugin and create a small box for the information, such as the one I add on album pages, but you would display it only on the home page. Look at it : https://album.chauvigne.info/index?/category/outre-mer
Offline
Katryne wrote:
PWGStuff plugin
Thank you very much. The plugin is leaner and easier to organize for different groups (guest, user, admin).
Great. You get valuable help in this forum.
https://pw.krasna-photo-collection.de/i … lang=en_US
Offline