• Hi guys,

    Thanks for this awesome plugin!

    However, I face the issue when activating this plugin, the custom background image is stretched in the Customizer. Seems to be the issue related to .container class being styled in assets/scss/plugins/grid.scss file.

    This also brings me to question: are you loading the plugin styles on all pages/posts regardless whether there is a map displayed?

    Thanks for solving.

    Regards,

    Oliver

    https://wordpress.org/plugins/google-maps-builder/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Devin Walker

    (@dlocc)

    Hey WebMan – Do you have a screenshot so I can see what you’re talking about? Regarding scripts, yes we load the JS and CSS on all pages in the frontend regardless of whether the map is displayed or not. This is because maps can be embedded many ways (shortcode, widget, using CPT) and WordPress makes it difficult to check for all these ways reliably. We also believe that websites should minify and concatenate all scripts and styles on their website if at all possible to reduce the number of requests and file size. This can result in faster load times than conditional script loading because the packaged script is smaller in size and contains all necessary code. There are a number of plugins that can help achieve this.

    Thanks for your question. Please let me know if you have anymore!

    Thread Starter WebMan Design | Oliver Juhas

    (@webmandesign)

    Hi Devin,

    Thanks for your reply. Here is the screenshot:

    Also, I can’t agree with you that it’s not possible to load the scripts conditionally:

    Please consider improving scripts loading not to break other things (such as the described issue with Customizer).

    I also experience the issue with the plugin styling color control in Customizer (coliding with other custom color control styles). Please try more targeted approach. Besides, why does this happen? I can’t see any Customizer settings for the plugin itself.

    Regards,

    Oliver

    Plugin Author Devin Walker

    (@dlocc)

    Hey hey,

    I was talking about loading scripts on the frontend. It looks like you are talking about the backend. We ARE in fact loading only scripts on the necessary Google Maps pages (look at gmb-scripts.php file) BUT we do load our grid styles on the widgets admin screen. This is causing the issue you mentioned.

    I agree, this needs to be fixed. I’ve created this GitHub issue and we’ll fix it for the next release: https://github.com/WordImpress/google-maps-builder/issues/119

    Thanks for reporting this.

    Thread Starter WebMan Design | Oliver Juhas

    (@webmandesign)

    Hi Devin,

    It’s hard to say if Customizer is back-end or front-end. I’ve actually stated that the error is in Customzer.

    My question of scripts loading was related to both, admin and front-end. You should always load the scripts only when needed and target only the plugin elements to prevent issues with other plugins and theme.

    Thank you for cooperation and fixing this!

    Best regards,

    Oliver

    Thread Starter WebMan Design | Oliver Juhas

    (@webmandesign)

    we load the JS and CSS on all pages in the frontend regardless of whether the map is displayed or not

    Please also consider loading scripts on front-end conditionally. It would
    improve the plugin greatly!

    Thanks,

    Oliver

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Hi Oliver,

    We have a lot of experience with plugin development, and fully understand the logic behind conditionally enqueueing scripts only when the plugin is loaded on the front-end. For themes and shortcodes that really makes a lot of sense, and for some plugins it makes a lot of sense as well.

    The problem that solution introduces is that minification and concatenation plugins are very common in WordPress, and often if you only load your script on a certain page, the minification plugin doesn’t catch it. Then suddenly we have all kinds of new support requests that really are related to someone else’s plugin.

    Also, because our styles and scripts are already minified, the impact they have on your other pages/posts is very minimal. But of course, if ALL plugins do that, then it all adds up quickly.

    We understand the pro’s and con’s really well. And we’ll continue to weight the benefits and advantages. Perhaps providing a setting to enable that kind of feature would be helpful for more advanced users.

    But I’m glad in the meantime that you and Devin were able to narrow down the backend problem. We’ll get that resolved for you soon. Thanks!

    Thread Starter WebMan Design | Oliver Juhas

    (@webmandesign)

    Hi,

    Thank you for input.

    I’ve never meant this to doubt your experience in developing plugins. The Maps Builder is probably the best plugin for adding Google Maps into the website I have found, so, great job done here!

    I just wanted to point out this issue as it really causes problems. And, similarly like you’ve mentioned, my customers could actually log a support ticket about it, while the issue is related to your plugin and not to my theme. I’ve definitely decided to recommend Maps Builder for my customers, you know…

    I’m not convinced by your reply though 😉 I understand the minification of scripts should be done with extra caution with WordPress caching solutions. Mainly because the ecosystem is so large you can not make a silver bullet for everything. But that should not prevent following the good practice in loading scripts.

    If you still plan to load the scripts on all pages, please, at least make sure you are targeting only the plugin’s elements. Please don’t apply custom CSS on .container class, but rather make it more specific, such as .maps-builder-wrapper .container, for example. This would prevent a lot of issues and I would probably have never noticed that you are actually loading those scripts on each page 😉

    Thank you for help and explanation and good luck in resolving the issue!

    Regards,

    Oliver

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    I appreciate your clarification. We definitely don’t want to cause issues with themes, as we’ve had lots of themes (and plugins) whose styles/scripts cause issues with our styles/scripts. It’s no fun at all! Thanks for your cooperation and definitely for your recommendation!

    Plugin Author Devin Walker

    (@dlocc)

    Hey just wanted to chime in here and say we have this issue fixed: https://github.com/WordImpress/google-maps-builder/issues/119 and it’s slated to be released in 2.0.2

    Thread Starter WebMan Design | Oliver Juhas

    (@webmandesign)

    Great! Thank you very much!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Customizer error’ is closed to new replies.