• Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #24840 - Problem with PK Menu module

Was creating several static pages today (no direct link to menu), and some menu items started to show disturbed (screenshot attached). Nothing else was done on the website.
Checked the error log and it shows this:
[14-Jul-2023 12:26:14 Etc/GMT+2] PHP Notice: Trying to access array offset on value of type bool in /home/cottonstore/newshop.cotton-store.com/modules/pk_menu/pk_menu.php on line 1409

The same is for - on line 1411, 1416 and 1420.

The problem is seen only on Google Chrome and not on MS Edge or Safari (all checked from desktop versions).

Please help to get the menu back again and get rid of error log. (I also attach error log file for the above copied string)

Attachments:

error_log (1.39 MiB)

Comments

Fred 19 Jul 2023, 20:09

Hi, Madara Mikuda-Rupeika.
Please fill out all necessary fields in your profile https://support.promokit.eu/myprofile to access to your FTP Server to let me find and apply a fix

Madara Mikuda-Rupeika 20 Jul 2023, 09:24

I added FTP information.

Fred 20 Jul 2023, 23:18

I just updated the file /modules/pk_menu/pk_menu.php but how to check error logs now to make sure everything is fixed?

Madara Mikuda-Rupeika 21 Jul 2023, 07:45

Problem is still there. The second item of the menu is lowered, the first one (Home) is missing the formatting. Error log last strings below.
If I duplicate the menu module, the second menu does not have this problem. We are launching the new website on 1st of August, so please help to get the menu back on track!

[21-Jul-2023 03:40:32 Etc/GMT+2] PHP Notice: Trying to access array offset on value of type bool in /home/cottonstore/newshop.cotton-store.com/modules/pk_menu/pk_menu.php on line 1409
[21-Jul-2023 03:40:32 Etc/GMT+2] PHP Notice: Trying to access array offset on value of type bool in /home/cottonstore/newshop.cotton-store.com/modules/pk_menu/pk_menu.php on line 1411
[21-Jul-2023 03:40:32 Etc/GMT+2] PHP Notice: Trying to access array offset on value of type bool in /home/cottonstore/newshop.cotton-store.com/modules/pk_menu/pk_menu.php on line 1416
[21-Jul-2023 03:40:32 Etc/GMT+2] PHP Notice: Trying to access array offset on value of type bool in /home/cottonstore/newshop.cotton-store.com/modules/pk_menu/pk_menu.php on line 1420
[21-Jul-2023 03:40:32 Etc/GMT+2] PHP Notice: Trying to access array offset on value of type bool in /home/cottonstore/newshop.cotton-store.com/modules/pk_menu/pk_menu.php on line 1420

Fred 21 Jul 2023, 23:41

Can you please check your logs now, since 23:40?

Madara Mikuda-Rupeika 22 Jul 2023, 00:06

The frontend is now off, Error 500.
Apart from the same error logs posted before, I get also logs since 23:40:
[21-Jul-2023 11:40:41 Etc/GMT+2] PHP Notice: Undefined index: name in /home/cottonstore/newshop.cotton-store.com/var/cache/prod/smarty/compile/alysum/2a/2e/e7/2a2ee787945c38254f2d46e36e1965e6350a0ce2_2.file.customer-form.tpl.php on line 52
[21-Jul-2023 11:40:41 Etc/GMT+2] PHP Notice: Undefined index: type in /home/cottonstore/newshop.cotton-store.com/var/cache/prod/smarty/compile/alysum/a6/49/0c/a6490c91735e1004dfc6193dba54a258f2447fc3_2.file.customer-form.tpl.php on line 58

Fred 22 Jul 2023, 16:35

I’m sorry, my fault, I didn’t notice that. Now it’s fixed, please check

Madara Mikuda-Rupeika 23 Jul 2023, 10:20

Yes, the frontend is again running, but the menu is still disrupted, visually the same, but the error log has now changed and is only one line now:
[21-Jul-2023 20:01:41 Etc/GMT+2] PHP Parse error: syntax error, unexpected ‘)’, expecting ‘]’ in /home/cottonstore/newshop.cotton-store.com/modules/pk_menu/pk_menu.php on line 1412

Fred 23 Jul 2023, 11:55

as I can see that’s an old error, it should not appear anymore

Madara Mikuda-Rupeika 23 Jul 2023, 12:00

The menu still looks like this (attached screenshot).
The last error log:
[22-Jul-2023 12:29:46 Etc/GMT+2] PHP Parse error: syntax error, unexpected ‘)’, expecting ‘]’ in /home/cottonstore/newshop.cotton-store.com/modules/pk_menu/pk_menu.php on line 1412

Fred 23 Jul 2023, 12:18

Please give me direct link where I can see that, because everything looks fine for me → https://take.ms/TbgeI

Madara Mikuda-Rupeika 23 Jul 2023, 12:36

What could be the reason, that I see disturbed menu on Google Chrome and MS Edge (but not Mozilla, which I just installed). Checked other computers and other IP addresses, they see it ok. I even re-installed Google Chrome and still disturbed menu. Any ideas?
Screenshot with all three browsers opened, only Mozilla has normal menu.

Attachments:

Fred 23 Jul 2023, 12:52

I guess you are logged in in one browser and not in another one
We had such issues some time ago, it was caused by sigh in widget.
I just fixed it in the file /modules/pkelements/views/templates/pksignin.tpl please test it out

Madara Mikuda-Rupeika 23 Jul 2023, 12:54

Thank you! Finally the mystery is gone :) All good now!

Fred 23 Jul 2023, 12:57

Great!