#1 2024-11-19 09:32:09

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
30

Plugin Evil_Blog

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)


Description of my installation: Bildarchiv

Offline

 

#2 2024-11-19 09:56:01

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
30

Re: Plugin Evil_Blog

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?


Description of my installation: Bildarchiv

Offline

 

#3 2024-11-19 11:49:02

erAck
Only trying to help
2015-09-06
2236

Re: Plugin Evil_Blog

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(...


Running Piwigo at https://erack.net/gallery/

Offline

 

#4 2024-11-19 12:22:24

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
30

Re: Plugin Evil_Blog

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

Code:

function content_673b3afe990819_21906468 (Smarty_Internal_Template $_smarty_tpl) {
?>  <?php echo $_smarty_tpl->tpl_vars['TITLE']->value;?>

Description of my installation: Bildarchiv

Offline

 

#5 2024-11-19 14:12:38

erAck
Only trying to help
2015-09-06
2236

Re: Plugin Evil_Blog

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.


Running Piwigo at https://erack.net/gallery/

Offline

 

#6 2024-11-19 16:39:57

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
30

Re: Plugin Evil_Blog

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

Code:

/* 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.


Description of my installation: Bildarchiv

Offline

 

#7 2024-11-19 16:41:44

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
30

Re: Plugin Evil_Blog

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

Code:

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.


Description of my installation: Bildarchiv

Offline

 

#8 2024-11-20 11:46:29

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
30

Re: Plugin Evil_Blog

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)


Description of my installation: Bildarchiv

Offline

 

#9 2024-11-21 12:48:22

erAck
Only trying to help
2015-09-06
2236

Re: Plugin Evil_Blog

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.


Running Piwigo at https://erack.net/gallery/

Offline

 

#10 2024-11-21 13:38:46

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
30

Re: Plugin Evil_Blog

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)


Description of my installation: Bildarchiv

Offline

 

#11 2024-11-21 13:46:56

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
30

Re: Plugin Evil_Blog

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)


Description of my installation: Bildarchiv

Offline

 

#12 2024-11-21 15:33:48

Katryne
Member
Provence, France
2016-12-03
601

Re: Plugin Evil_Blog

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


https://album.chauvigne.info/ v.16.4  PHP: 8.2.29
Système d'exploitation: Linux - Hébergeur 1&1-Ionos - MySQL: 5.7.42
Bibliothèque graphique: External ImageMagick 6.9.11-60

Offline

 

#13 2024-11-21 18:31:11

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
30

Re: Plugin Evil_Blog

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


Description of my installation: Bildarchiv

Offline

 

Board footer

Powered by FluxBB