PopupMaker / Popup-Maker

Popup Maker plugin for WordPress
https://wppopupmaker.com/
104 stars 39 forks source link

Appeared incompatibility with Gravity Forms after updating to Version 1.7.11 #530

Closed grgsolymosi closed 6 years ago

grgsolymosi commented 6 years ago

Hello,

I updated recently and then I experienced several issue with Gravity Forms. They works fine together before, bur then some Gravity lost the prefilled fields data and the list field "+-" sign became huge sized and changed them colors.

Could you please tell me, where can I find the previous version? Or some advice, how can I avoid the issue?

Thank you,

George

Begin System Info

-- Site Info

Site URL: https://globalsyria.org Home URL: https://globalsyria.org Multisite: No

-- Hosting Provider

Host: DBH: localhost, SRV: globalsyria.org

-- User Browser

Platform: Windows Browser Name: Chrome
Browser Version: 64.0.3282.186 User Agent String: Mozilla/5.0 (Windows NT 10.0; Wi n64; x64) AppleWebKit/537.36 (KH TML, like Gecko) Chrome/64.0.328 2.186 Safari/537.36

-- WordPress Configuration

Version: 4.9.4 Language: en_US Permalink Structure: /%category%/%postname% Active Theme: GSI 0.1 Show On Front: posts Remote Post: wp_remote_post() works Table Prefix: Length: 3 Status: Acceptable WP_DEBUG: Enabled Memory Limit: 3000M Registered Post Stati: publish, future, draft, pending, private, trash, auto-draft, inherit

-- Popup Maker Configuration

Version: 1.7.11 Upgraded From: None

-- WordPress Active Plugins

Cookie Notice: 1.2.41 Disable Gravity Forms Fields: 1.3.1 Divi Booster: 2.7.1 Divi Builder: 2.0.68 Duplicate Menu: 0.2.1 Duplicate Post: 3.2.1 Enable Media Replace: 3.2.1 Google Analytics Dashboard for WP (GADWP): 5.3.1.1 Gravity Forms: 2.2.6.1 GSi Hooks: 1.0 MailChimp for WordPress: 4.1.15 Popup Maker: 1.7.11 Redirection: 3.2 Remove Yoast SEO Comments: 3.1 SendGrid: 1.11.8 Smart Slider 3 Pro: 3.2.12 SVG Support: 2.3.11 UpdraftPlus - Backup/Restore: 1.14.4 Use Any Font: 4.9.2 WP File Manager: 1.9 WPML Media: 2.2.3 WPML Multilingual CMS: 3.9.3 WPML String Translation: 2.7.3 WPML Translation Management: 2.5.2 Yoast SEO: 6.3.1

-- WordPress Inactive Plugins

Accelerated Mobile Pages: 0.9.83 ADL Post Slider: 1.4 Admin Columns: 3.1.3 Admin Menu Tree Page View: 2.7 Advanced Custom Fields Multilingual: 0.7 Akismet Anti-Spam: 4.0.3 Anti-Spam by CleanTalk: 5.89 Backup/Restore Divi Theme Options: 1.0.3 Better Adjacent Post Links: 1.1 Bloom: 1.2.23 Caldera Custom Fields: 2.2.1 Caldera Forms: 1.5.9.1 Caldera Forms Translation: 1.2.1 Cloudflare: 3.3.2 Conditional Fail for Caldera Forms: 1.0.1 Contact Form DB: 2.10.34 EWWW Image Optimizer: 4.1.0 Featured Video Plus: 2.3.3 Fonts: 2.3 GitHub Updater: 7.5.0 Gravity Forms Multi-Column: 1.1.0 Gravity Forms Multilingual: 1.3.16 If Shortcode: 0.2.1 Inactive Logout: 1.7.2 Insert Headers and Footers: 1.4.2 Lightweight Grid Columns: 1.0 List Field Number Format for Gravity Forms: 1.5.0 LTR <=> RTL Admin content: 0.4.5 MailChimp for WordPress Multilingual: 0.0.1 Media File Renamer: 4.0.2 MetaSlider: 3.7.0 MetaSlider - Pro Add-on Pack: 2.7.3 Monarch Plugin: 1.3.25 Multiple Columns for Gravity Forms: 2.1.1 Page Specific Menu Items: 1.6.5 Password Protected: 2.1 Phoenix Media Rename: 1.2.4 Postmatic For Caldera Forms: 1.0.1 Query Monitor: 2.17.0 Responsive Menu: 3.1.13 Smart Slider 3: 3.2.13 UpiCRM - Universal WordPress CRM Solution: 2.1.9.2 User Profile Picture: 1.4.3 User Role Editor: 4.40 Verify Email for Caldera Forms: 1.1.0 WordPress phpinfo(): 16.3 WP Encrypt: 1.0.0-beta.8 WP Meta and Date Remover: 1.7.2 WPML All Import: 2.0.4 WPML CMS Nav: 1.4.22 WPML Sticky Links: 1.4.3 WPML Widgets: 1.0.6 WP Mobile Detect: 2.0 WP Smush: 2.7.8 WP Super Cache: 1.5.9

-- Webserver Configuration

PHP Version: 5.6.33 MySQL Version: 5.7.21 Webserver Info: Apache

-- PHP Configuration

Memory Limit: 3000M Upload Max Size: 200M Post Max Size: 200M Upload Max Filesize: 200M Time Limit: 600 Max Input Vars: 1000 Display Errors: On (1)

-- PHP Extensions

cURL: Supported fsockopen: Supported SOAP Client: Not Installed Suhosin: Not Installed

-- Session Configuration

Session: Disabled

End System Info

danieliser commented 6 years ago

This is the current & only report of this so I'm leaning towards its not an issue with the latest 2 versions as I just tested.

Can you check for JS errors on those pages?

grgsolymosi commented 6 years ago

@danieliser Thank you for your reply. Do you tested with the prefill functionality and the list fields too? I have no codes currently with javascript at all, and there is no other plugin deployed to do JS neither, this is pure php. Furthermore it's working fine with the older version again. So it seems to me definitely an incompatibility issue with the new version. I always make several tests thoroughly before I open an issue. This happened in this case either.

danieliser commented 6 years ago

@Greilachelous Not sure I follow. If you mean do we test browser autofill on the fields, then no, not something we should be testing as our plugin has nothing to do with that. We only integrate with form success actions, beyond that if your seeing issues it likely has little to do with PMs update. We literally changed maybe 2-5 lines of code in a minor way for NF integrations. Also since we support quite a few form plugins, we will in no way be trying to test all the fields, all the addons etc.Just not in our wheelhouse and if there are issues, should likely be reported to the form authors

That said autofill is a known issue for NF, not one created by using our plugin with it, in fact try out our Affiliate form and it has the same issue. They know about it and are working on it.

Hope that helps.

grgsolymosi commented 6 years ago

@danieliser Firstly thank you for your detailed answer Daniel.

But the facts:

  1. Gravity form prefills worked fine with the PM version 1.6.6.
  2. Gravity form prefills don't work at all with the PM version 1.7.11.
  3. Gravity form prefills worked fine again with the PM version 1.6.6. after downgrading.

I agree that you may be right in the context that Gravity can have a bug which reveals only with the PM 1.7.11., but it will turn out later I guess. I just gave a chance to inform you and tried to find some solution to use again your most recent version. I will find the reason, what would be the root of the problem. Anyway 1.6.6. is still working fine I love your plugin, so thank you again.

Best regards,

George

danieliser commented 6 years ago

@Greilachelous - Sorry confused this with a similar ticket for Ninja Forms. Testing to see if GF has similar issues for me today. That said I highly doubt there would be any issues. To be clear the only reason NF has any issues is beause they don't use html elements, but rather their own custom ones like which browsers don't recognize, otherwise never heard of any issues with prefilling. Generally that would indicate a localized browser/browser extension issue.

Again gonna test, the above is just experience speaking.

danieliser commented 6 years ago

Also to clarify, are you talking about start typing your name and browser offers to prefill or setting form fields based on url query args.

danieliser commented 6 years ago

Just tested adding a field with populate dynamically and entered "field" for the parameter name. Put it in a popup and loaded the home page adding ?field=Daniel and the popup showed with the field showing Daniel in it.

Also just tested that browser prefill is working. Did for me.

All in all seems to be working as expected based on all info I have.

grgsolymosi commented 6 years ago

@danieliser - No problem with the NF - GF confusion.

You are right at the point that GF prepopulates the fields with the url query args. But after I use add_filter( 'gform_field_value') GF lost the fields value. So at the rendering they have no value anymore.

I will check again it with reupdate and I will inform you about the results.

Thank you for your work & efforts!

danieliser commented 6 years ago

@Greilachelous if you are filtering them, the only thing I can say is make sure you always return a value. Otherwise that is where I would likely start as well, in your filter function.

Let me know.

grgsolymosi commented 6 years ago

@danieliser Hello Daniel, I had a break because of another project, but now I'm back again on this issue I have. I made a lot of test:

  1. Without Popup maker, only embed form in a text box on the page: Note: light blue boxes are the fields to prefill, + (-) signs are the problematic element of gravity form's list field:

only_on_page only_on_page-class_css

  1. With Popup Maker:

pum pum-class-css

  1. With another Popup Tools(no matter which) other_pm other_pm-class_css

The results:

  1. As you can see somehow GF lost with (add_filter( 'gform_field_value', 'myfunction' )) hookup prefilled values.
  2. Another issue that the +- signs, which are svg-s lost their original styles, class etc. Somehow inherit the pum image classes instead of keeping their default img class.

Since I use and like the plugin you created and honour your work in general, I would be more than happy to find some solution for this problem.

danieliser commented 6 years ago

What happens if in the inspector you uncheck the styles for pum.responsive img applies to max-width and height?

danieliser commented 6 years ago

Lastly I didn’t see where you addressed the possible issue I mentioned previously. If you are using any filter be sure it always returns the first parameter. Even if your checks are true/false a value must be returned.

A filter that doesn’t return breaks the functionality of whatever called that filter in the first place. Example if you filter the form values and don’t return, there won’t be any values saved/rendered.

grgsolymosi commented 6 years ago

@danieliser Nothing, but if I set the max-width, the size of img changes.

grgsolymosi commented 6 years ago

@danieliser As the filter pass the $value argument to the function:

add_filter( 'gform_field_value', 'prefill_fields', 10, 3 );
function prefill_fields( $value, $field, $name ) {

and the function last few row is:

    return $value;

}

and there is no additional return in the function body, thus the filter always return a value. If it broke the functionality, then there would be the same issue at the 1.) and 3.) obviously.

grgsolymosi commented 6 years ago

@danieliser Hello Daniel, Isn't there any straightforward solution from your side? George

danieliser commented 6 years ago

@greilachelous - To what issue exactly? The problem is I can’t duplicate the issue nor has anyone else reported it. Further your site uses customizations we can’t account for which could be further complicating the issue. Honestly it very wel could be a one off caused by some strange combination of plugins theme and custom code.

I will go over our changes for v1.7 but there were no major changes that involved our integration with Gravity forms. Further as I stated in my first response none of our team can duplicate it. IE not much has changed code wise from one version to the next so I’m not sure where to go from there except trying to help you resolve it for your own needs unless more evidence or information shows up to point us in a specific direction.

grgsolymosi commented 6 years ago

@danieliser You summarized my thoughts quite well. Though: I made a fresh install of Wordpress only installing Gravity Forms and Popup Maker. Made a simple form with only a single one list field. I got the following result: image So actually it is quite easy to reproduce. Of course I can apply some JS hack to replace back pum img class with default img. Yes. For me a bit unlucky situation, that either nobody uses GF list fields with PUM or bypass it some other combination of things or tools.

The second issue(prefilled fields) is another "miracle", yes this can be some unlucky combination of codes or any, I would like to puzzle what causes it, but obviously I try to optimize my time too. Thus the options remained for me either to find another prefill method in Gravity Form API which is not a preferred way by GF but maybe will work with PUM at least or choose another popup tool for this express purpose, which is a bit annoying and unpractical. Personally I prefer the first, we will see if it will be success at the very end.

At the same time I absolutely understand that this kind of cases is out of your priority. Final note that as turned out I got the same functionality in older versions too, so it appeared not with the 1.7.11 as I wrote in the title.