Hustle PHP 7.2 compatibility issue

Getting the following error when PHP 7.2 is tested with Hustle:

24275#0: *174720 FastCGI sent in stderr: "PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/xxx/xxx/wp-content/plugins/hustle/inc/hustle-model.php on line 326
PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/xxxx/xxxx/wp-content/plugins/hustle/inc/hustle-model.php on line 326
PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/xxx/xxxx/wp-content/plugins/hustle/inc/hustle-model.php on line 326" while reading response header from upstream
  • Martin

    Hmm...

    So, I just looked at the Hustle Pro settings, and found that my email subscription pop-up has disappeared, along with all of its data and settings, so it would seem that user data is not being migrated to the latest version after upgrade.

    I just spent an hour recreating my pop-up, and trying to get my MailChimp groups to display in the form, but it's not working. I can select my groups in the MailChimp settings, but they don't appear in the pop-up.

    Also, as far as I can tell, the pop-up just isn't popping up on the front end, despite it being marked as Live. So, I'm now without an email subscription form on my site, and I'm currently running an important marketing campaign with a third party company, so it's a pain that I can't collect any visitor email addresses right now.

    I've tried both with PHP 7.1 and 7.2 and it doesn't seem to be version related, more due to the updates in Hustle Pro.

    I've granted support access in case you want to take a look at my settings, but note that the site is a live production site, so please don't make any changes like deactivating plugins etc.

    Thanks in advance for your help.

  • Kasia Swiderska

    Hello Martin,

    I apologize for the late response - in case of issues like that I suggest contacting us on live chat https://premium.wpmudev.org/live-support/ where staff can check site instantly.

    So, I just looked at the Hustle Pro settings, and found that my email subscription pop-up has disappeared, along with all of its data and settings, so it would seem that user data is not being migrated to the latest version after upgrade.

    If upgrade didn't go well try running it manually. In order to do the migration manually, add &reset_migration=1 to the hustle's dashboard url, it will be something like yoursite.com/wp-admin/admin.php?page=hustle&reset_migration=1

    Please note that running this produces duplicates, so you will likely have to delete duplicates if the migration runs multiple times.

    Let me know if this will fix the issue.

    kind regards,
    Kasia

  • Martin

    Hi Kasia,

    I just tried the migration reset, and nothing happened.

    I don't have time to get into chats as I'm traveling from next week and too busy trying to prepare some content before I leave, and in my experience, they rarely lead me to an acceptable solution.

    I guess what I need right now is some solid advice on how to get my pop-up working again, and quickly.

    For example, if I uninstall Hustle Pro 3 and reinstall it, will it work on PHP 7.2.1? If the answer is yes, I'll give it a try.

    Or, was there a version of Hustle Pro before 3.0 that should have worked on PHP 7.2? I didn't realize when you said that the upgrade fixed the issue that it was also a major release. Was there a 2.x release that fixed the issue and if so, how can I downgrade or reinstall that version?

    I have wasted a whole week of my marketing campaign, and I still have no mail form popping up. I love what you guys do here, but something always seems to go wrong at critical times for me, and when this happens reaching a solution always takes too long.

    I have two days before I start traveling again, and although I'm busy, if I can get some priority help, I have a chance of fixing this mess before I leave.

    Regards,
    Martin.

  • Kasia Swiderska

    Hello Martin,

    For example, if I uninstall Hustle Pro 3 and reinstall it, will it work on PHP 7.2.1? If the answer is yes, I'll give it a try.

    Yes, Hustle 3 works on PHP 7.2.1 - I am running it right now on my site, with 7.2.1 enable with debug log enabled, it does not throws error reported in initial post (there is actually no notices or warnings coming from Hustle).

    Or, was there a version of Hustle Pro before 3.0 that should have worked on PHP 7.2? I didn't realize when you said that the upgrade fixed the issue that it was also a major release. Was there a 2.x release that fixed the issue and if so, how can I downgrade or reinstall that version?

    No, there was no version before one this issue was reported and between 3.0. Rolling down to previous version will mean it wont work with 7.2

    But there is another possibility - upgrading to 3.0 introduced conflict (with theme or another plugin) that was not a case with lower version.
    I've tested on my site similar setup like there is on yours and I wasn't able to replicate this issue - popups are showing correctly.

    Because its a live site I understand that running plugin/theme conflict might not be option. So I would like first check the debug.log. Could you please send in the following via our secure contact form https://premium.wpmudev.org/contact/#i-have-a-different-question :

    - Mark to my attention, the subject line should contain only: ATTN: Kasia Swiderska
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    - Include any relevant URLs for your site

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    Please confirm here that you send those credentials

    kind regards,
    Kasia

  • Martin

    Kasia,

    Sorry for the delayed reply. I've been incredibly busy, and will remain so for a few weeks.

    But, I was on TV here in Japan this week, and was cursing the fact that Hustle still isn't working on my site as I saw a nice big spike in visitors to be site, so not one of them was asked if they'd like to subscribe to my newsletters.

    I don't have time to do what you suggested above, but I just ran a PHP compatibility check on my site and I'm seeing the below fatal error for Hustle.

    FILE: /var/www/vhosts/martinbaileyphotography.com/httpdocs/wp-content/plugins/hustle/inc/providers/opt-in-hubspot.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------
    184 | ERROR | Using 'continue' outside of a loop or switch structure is invalid and will throw a fatal error since PHP 7.0
    ----------------------------------------------------------------------------------------------------------------------------

    Is this enough for the developer to take a look? This seems like a pretty obvious problem to fix.

    Regards,
    Martin.

  • Kasia Swiderska

    Hello Martin,

    I don't have time to do what you suggested above, but I just ran a PHP compatibility check on my site and I'm seeing the below fatal error for Hustle.

    FILE: /var/www/vhosts/martinbaileyphotography.com/httpdocs/wp-content/plugins/hustle/inc/providers/opt-in-hubspot.php

    I have also run PHP check couple of time for Hustle and PHP 7.2 and it does not show me any lines like that.
    I used this plugin https://wordpress.org/plugins/php-compatibility-checker/ and selected PHP 7.2

    It shows that plugin is compatible:

    That error you see is only for one of the email provider, so it should not affect display of popups.
    So I would need to setup debug.log on your site to see what is preventing them from displaying, but to do that I would need to have access to FTP.

    kind regards,
    Kasia

  • Martin

    OK, so after 3.5 months, I've finally been able to solve this, thanks to my theme's support team.

    I noticed a few times that I could see the popup in the browser before the main pages loaded. I created a staging server and switched to the Twenty Fifteen theme, and the popup worked fine.

    So, I contacted my theme's support team, and they gave me the following code to add to the Custom CSS field, and Hustle Pro finally jumped back to life.

    .wph-modal.wph-modal-active
    {
        z-index: 1000;
    }

    As I was testing that everything worked OK, and I checked the popup on an iPhone 4, with a small screen, and found that the group fields are not wrapping. See the attached screenshot. There are three groups that should be displayed, and there is room for them vertically, but they are not wrapping.

    Could someone take a look at this?

    Regards,
    Martin.

  • Dimitris

    Hey there Martin,

    hope you're doing good and don't mind me chip in here! :slight_smile:

    I inspected that using Chrome's Dev Tools and couldn't experienced it.

    In case this is still an issue for you, please try to add the following custom CSS:

    .hustle-modal-mc_option {
        display: block !important;
    }

    You can insert this in a new line of the very bottom of
    Appearance -> Customize -> Additional CSS

    Warm regards,
    Dimitris

  • Martin

    Hi Dimitris,

    Thanks for looking, but the code doesn't help.

    I just tried with the iPhone 5 simulator in X-Code, and I saw the same as what you see in the Chrome simulator. However, on a real iPhone 5 with a small screen, the fields are still in one straight line.

    Basically, a simulator doesn't show the same as an actual phone, and the issue is not resolved by the code provided.

    Regards,
    Martin.

  • Martin

    Hi Nahid,

    Actually, that's another problem I'm having with Hustle Pro. It keeps forgetting about the groups, and I now have to go back in and reassociate them.

    I've just done that, but they'll disappear again in a few days.

    Honestly, this plugin is more trouble than it's worth. I think I'm going to go back to my old solution and uninstall Hustle Pro if I can't get it working properly soon.

    Regards,
    Martin.

  • Dimitris

    Hello there Martin,

    hope you're doing good today! :slight_smile:

    Actually, that's another problem I'm having with Hustle Pro. It keeps forgetting about the groups, and I now have to go back in and reassociate them.
    I've just done that, but they'll disappear again in a few days.

    Haven't experienced anything like that before... If this is still happening to you though, and as we're keen on having separate threads per issue, and this post is for another case initially and already has become pretty long, please do reach us here
    https://premium.wpmudev.org/hub/support/#get-support
    for a live chat session or in order to create a new thread in our support forums.

    In there, please inform us about any caching you use via plugins, server-side and/or 3rd party services like Cloudflare, as this sounds more like a caching issue to me.

    Warm regards,
    Dimitris

  • Martin

    You know what? I just updated Hustle Pro to the latest version (3.0.2) and my email popup is now completely empty. The Popup appears in the list for me to edit, but when I open it, there's nothing there. It's disappeared.

    This plugin has been nothing but trouble for me. I've lost four months now over various issues, and that isn't including earlier issues. I don't have time right now to mess with opening support tickets. My site is running flawlessly otherwise.

    I've disabled Hustle Pro and it will stay that way until I have absolutely nothing else to do.