[PopUp Pro] Popup plugin save issue

I get this error when I try and save a popup:

Warning: Illegal string offset 'delay' in /home/natur603/public_html/wp-content/plugins/popover/inc/class-popup-item.php on line 364

  • Adam Czajczyk

    Hello Pallant Digital

    I hope you're well today and thank you for your question!

    This is just a warning so it shouldn't affect the way plugin works in most cases, though there might be exceptions.

    Are you getting that error right on site and it doesn't let you save popup settings or is it something you noticed in debug.log? If it's on site, could you please:

    - access site installation via FTP or cPanel "File Manager"
    - open "wp-config.php" file for editing
    - see if there's this line there:

    define( 'WP_DEBUG', true);

    If it is there, add following two lines right below it:

    define( 'WP_DEBUG_DISPLAY', false);
    define( 'WP_DEBUG_LOG', true);

    and see if the error goes away from the site and the popup can be saved and is working.

    Let me know, please. If it helps, could you also please tell me what PHP version are you using? You can see it in "PHP" section of the "WPMU DEV -> Support" page after clicking "System Info" button there.

    If that doesn't help, could you please enable support access to the site so I could take a closer look? To do this, go to the "WPMU DEV -> Support" page in your site's back-end, click on "Grant support access" button there and let me know here.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Pallant Digital

    Thank you for your response!

    If adding those lines to the "wp-config.php" file was causing white screen that means that they were either added in a wrong location inside the file or there was some small "typo" type mistake. But that's just a sidenote in case you were asked to enable debugging in future.

    You're most likely right on this: the error is probably related to particular setting. The error points specifically to the "When to show the PopUp" -> "Appear after" (the first one) option of selected popup configuration.

    The "delay offset" mentioned in the plugin is a data object element "delay" and that's fetched from the database, it's stored in the database as post meta data. The error says exactly "the configuration option of the popup that we fetched from the database - or received from admin page - doesn't contain the delay option". The line mentioned in the warning message points to a procedure that's triggered upon popup update and validates configuration data.

    That's actually a bit strange. I asked about PHP version because I initially assumed it might be related (as that kind of "illegal offset" issues ofthen are) but after looking into it again, I'm not so sure. I'm still not ruling that out but I'll need to gather more insight.

    Unfortunately, I couldn't replicate that as I don't have PHP 7.3 at hand at any of my hosting accounts and currently on the local host either, apparently none of my colleagues who are online at the moment have that too. Of course I will test it but I'd appreciate a bit more patience as I need to setup myself a test environment with 7.3 release and possibly in addition "catch up" with one of my colleagues here who also do have 7.3 to test - so we could double-check and confirm that we go the same results.

    Meanwhile, it would be great if you could keep testing that as you might be able to spot some "pattern" on when it happens exactly (especially knowing about which option it applies to). I'm also wondering if you got a way to test it with any lower PHP version (it seems to be working fine for me on 7.2.x) and I'd also like you to check one thing in the database, if possible:

    - first go to PopUps -> PopUps page in your site's back-end and enter "Edit" for the popup affected
    - look into the browser address bar and you should see a part of an URL like "/post.php?=12345" so note down the number that you see (it's a post ID)
    - then access the database and open the _postmeta table
    - if you're using phpMyAdmin you would see "Search" tab on top so enter it and put that number in "value" field for "post_id" row; then click "Go" to perform search
    - look for "po_display" and "po_display_data" meta-key there and share "meta_value" content of them both with me, please.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.