View Issue Details

IDProjectCategoryView StatusLast Update
0019311phpList 3 applicationCampaign Managementpublic10-07-18 18:21
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version3.3.4 - RC2 
Target Version3.3.4Fixed in Version 
Summary0019311: Edit a campaign not displaying properly with Dressprow theme.
DescriptionWith the Dressprow theme editing a campaign is not displaying properly, see the attached screenshot.


TagsNo tags attached.

Activities

duncanc

08-07-18 17:27

updater  

duncanc

08-07-18 17:33

updater   ~0060856

Seems to be caused by an error in this PR https://github.com/phpList/phplist3/pull/355/files

   'dashboard' => array(
        'toplink'=> 'home',
        'pages' => ''),

'pages' should be an empty array not an empty string. This triggers a php warning when it is used

[Sun Jul 08 18:14:18.372938 2018] [:error] [pid 19303] [client 127.0.0.1:58230] PHP Warning: in_array() expects parameter 2 to be array, string given in /home/duncan/www/lists_3.3.4-RC2/admin/connect.php on line 801, referer: http://strontian/lists/admin/?page=messages&tk=1c6cdf468685ce9481302df741ce2ae6

For some reason that warning is treated as a fatal error when using Dressprow, but not for Trevelin.

duncanc

08-07-18 17:36

updater   ~0060857

Last edited: 08-07-18 17:38

View 2 revisions

I suggest testing all changes with both themes and also checking the php error log because there are a few other warnings about undefined index, invalid argument, and further in_array() expects parameter 2 to be a string.

Sun Jul 08 18:28:54.011347 2018] [:error] [pid 19988] [client 127.0.0.1:58422] PHP Notice: Undefined index: menulinks in /home/duncan/www/lists_3.3.4-RC2/admin/connect.php on line 1078, referer: http://strontian/lists/admin/?page=configure&tk=1c6cdf468685ce9481302df741ce2ae6
[Sun Jul 08 18:28:54.011376 2018] [:error] [pid 19988] [client 127.0.0.1:58422] PHP Warning: Invalid argument supplied for foreach() in /home/duncan/www/lists_3.3.4-RC2/admin/connect.php on line 1078, referer: http://strontian/lists/admin/?page=configure&tk=1c6cdf468685ce9481302df741ce2ae6
[Sun Jul 08 18:28:54.038531 2018] [:error] [pid 19988] [client 127.0.0.1:58422] PHP Notice: Undefined variable: page_title in /home/duncan/www/lists_3.3.4-RC2/admin/ui/phplist-ui-bootlist/functions.php on line 2, referer: http://strontian/lists/admin/?page=configure&tk=1c6cdf468685ce9481302df741ce2ae6
[Sun Jul 08 18:28:54.039324 2018] [:error] [pid 19988] [client 127.0.0.1:58422] PHP Notice: Undefined index: info in /home/duncan/www/lists_3.3.4-RC2/admin/ui/phplist-ui-bootlist/mainmenu.php on line 21, referer: http://strontian/lists/admin/?page=configure&tk=1c6cdf468685ce9481302df741ce2ae6
[Sun Jul 08 18:28:54.039341 2018] [:error] [pid 19988] [client 127.0.0.1:58422] PHP Warning: in_array() expects parameter 2 to be array, null given in /home/duncan/www/lists_3.3.4-RC2/admin/ui/phplist-ui-bootlist/mainmenu.php on line 21, referer: http://strontian/lists/admin/?page=configure&tk=1c6cdf468685ce9481302df741ce2ae6

michiel

08-07-18 17:41

manager   ~0060858

Thanks Duncan. Yes, I agree, we should always keep an eye on the error log to identify issues. We should look into auto-verification for that.

duncanc

08-07-18 18:13

updater   ~0060859

Just found that the fatal error was caused by another plugin, not included with phplist, setting an error handler. The php warning was then treated as a terminal error, so you would not have seen the error that I had.

michiel

08-07-18 19:03

manager   ~0060860

Thanks. Yes, I have been unable to reproduce it locally.

samtuke

09-07-18 08:43

administrator   ~0060863

@xheni @suela I suppose it is harder to catch these kind of errors with behat, but perhaps we can turn on error reporting and search the page for PHP warnings and errors via Goutte.

duncanc

09-07-18 08:57

updater   ~0060864

Reviewing the code in connect.php, each entry of $GLOBALS['pagecategories'] must be an array with three entries - toplink, pages, and menulinks. The latter two must themselves be arrays.

xheni

09-07-18 11:03

administrator   ~0060865

https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/connect.php#L801-L803
there it does if (in_array($page, $cat_details['pages'])) {
so it reads the pages and if those do not exist it will then say "cannot read key pages".

duncanc

09-07-18 11:14

updater   ~0060866

@xheni you are misunderstanding the problem. As I explained earlier

    'pages' should be an empty array not an empty string

xheni

09-07-18 11:16

administrator   ~0060867

@duncanc I meant the same thing. I will create a PR now.

xheni

09-07-18 13:58

administrator   ~0060868

PR: https://github.com/phpList/phplist3/pull/370