WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

You are not logged in.

#1 30.09.2020 12:06:17

viktor321j
Member

[Erledigt] NWI-Anywhere Hinweis (Notice)

NWI Anywhere-Aufruf, so in einen Code2-Abschnitt eingefügt:

$config = array(
'group_id_type' => 'section_id',
'group_id' => 8,
'display_mode' => 3,
);
echo getImageNewsItems($config);

erzeugt diesen Hinweis:

Notice: Undefined index: page_id in /var/www/wbce/modules/news_img_anywhere/include.php on line 318

Es handelt sich um eine neu aufgesetzte Seite (WBCE 1.4.5).

Last edited by florian (01.10.2020 08:49:23)

Offline

#2 30.09.2020 12:22:59

florian
Administrator

Re: [Erledigt] NWI-Anywhere Hinweis (Notice)

Danke für den Hinweis. Es müsste eigentlich genügen, in der modules/news_img_anywhere/include.php die fragliche Zeile 318

'PAGE_ID'            => (int)$row['page_id'],

zu entfernen.


Sorgen sind wie Nudeln: man macht sich meist zu viele.

Offline

Liked by:

viktor321j

#3 31.08.2021 02:41:47

losttrip
Member

Re: [Erledigt] NWI-Anywhere Hinweis (Notice)

WBCE Version: 1.4.4
PHP Version: 7.4.22

Having the same or similar issue.

Code 2 section:

$config = array(
	'group_id_type' => 'group_id',
	'group_id' => 0,
	'display_mode' => 5,
	'start_news_item' => 0,
	'max_news_items' => 20,
	'max_news_length' => -1,
	'strip_tags' => false,
	'allowed_tags' => '<p><a><img>',
	'custom_placeholder' => false,
	'sort_by' => 1,
	'sort_order' => 1,
	'not_older_than' => 0,
	'lang_id' => 'AUTO',
	'lang_filter' => false,
	'skip' => null,
            'tags' => null
);
// calling getImageNewsItems() without configuration array uses the defaults above
echo getImageNewsItems($config);

Errorlog viewer is full of lines with this Notice each time the page containing the code2 section is viewed:

[Notice] /modules/news_img_anywhere/include.php:[318] from /modules/code2/view.php:[52] "Undefined index: page_id" 

This line you suggested is already included on line 318 of modules / news_img_anywhere / include.php

'PAGE_ID'            => (int)$row['page_id'],

Offline

#4 31.08.2021 07:25:03

florian
Administrator

Re: [Erledigt] NWI-Anywhere Hinweis (Notice)

It's a translation issue. The line

'PAGE_ID'            => (int)$row['page_id'],

has to be removed.


Sorgen sind wie Nudeln: man macht sich meist zu viele.

Offline

Liked by:

losttrip

#5 31.08.2021 10:31:37

losttrip
Member

Re: [Erledigt] NWI-Anywhere Hinweis (Notice)

Thank you so much!

Offline

Board footer

up