Home › Toolset Professional Support › [Resolved] Breaking change with Bricks update 1.10
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
This topic contains 7 replies, has 2 voices.
Last updated by Minesh 3 months, 2 weeks ago.
Assisted by: Minesh.
I am just noticing a small GUI issue in getting the Fields & Views pop up picker from loading from Bricks builder rich text module. This worked until the recent Bricks 1.10 update. While most field data options can be accessed via Brick's own interface not being able to access the shortcodes for content templates and views is an inconvenience. Having to open a blank post eleswhere to get the shortcode is not a great workflow.
If the Field and Views button is cliked it just jumps up and down.
On inspection the Console output the following:
jquery.min.js:2 Uncaught
TypeError: _.contains is not a function
at new WPViews.ShortcodesGUI (views_shortcodes_gui.js:343:24)
at HTMLDocument.<anonymous> (views_shortcodes_gui.js:4892:27)
at e (jquery.min.js:2:27028)
at t (jquery.min.js:2:27330)
WPViews.ShortcodesGUI @ views_shortcodes_gui.js:343
(anonymous) @ views_shortcodes_gui.js:4892
e @ jquery.min.js:2
t @ jquery.min.js:2
Hello. Thank you for contacting the Toolset support.
Based on the debug information you shared with us I noticed that you are using optimization plugins.
Can you please try to follow the following Doc and make sure to exclude the mentioned CSS and JS files from optimization/minify.
- https://toolset.com/faq/how-to-use-optimization-plugins-with-toolset/
Hi Minesh,
I had a look through the documant you linked. Regarding optimisations, the Fields and Views popup worked up to the latest Bricks update to 1.10. Not withstanding this I turned off all the optimisations configured with the SG Optimiser plugin and anything performace related in Bricks itself and the issue still wasn't resolved. And Minify JavaScript Files was never activated in the SG plugin anyway.
Regarding the jquery.min.js:2 Uncaught from Console, Bricks support have since suggested that they don't think this is the cause, though I see mention of WPViews.ShortcodesGUI @ views_shortcodes_gui.js:343
Again the issue started with the Bricks 1.10 update, so if there is anything that you can highlight that can be brought back to Bricks suppot much appreciated.
For full coverage I am pasting the debug code from a local playground install that doesn't have any optimisatoin set up. Let me know if you are seeing the same reference to the optimization plugins, unless the optimisation is coming from Bricks itself?
{"core":{"Wordpress":{"Multisite":"No","SiteURL":"https:\/\/bricks-toolset.local","HomeURL":"https:\/\/bricks-toolset.local","Version":"6.6.1","PermalinkStructure":"\/%postname%\/","PostTypes":"post, page, attachment, revision, nav_menu_item, custom_css, customize_changeset, oembed_cache, user_request, wp_block, wp_template, wp_template_part, wp_global_styles, wp_navigation, wp_font_family, wp_font_face, wp-types-group, wp-types-user-group, wp-types-term-group, acf-taxonomy, acf-post-type, acf-ui-options-page, brxc_color_palette, acf-field-group, acf-field, view, view-template, bricks_fonts, bricks_template, concert, performer-instrument, location, concert-location, wpa-helper","PostSatus":"publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, acf-disabled, hidden"},"Server":{"jQueryVersion":"3.7.1","PHPVersion":"8.1.23","MySQLVersion":"8.0.16","ServerSoftware":"nginx\/1.16.0"},"PHP":{"MemoryLimit":"256M","UploadMax":"300M","PostMax":"1000M","TimeLimit":"1200","MaxInputVars":"4000"}},"plugins":{"active_plugins":{"bricks-advanced-themer\/bricks-advanced-themer.php":{"Name":"Advanced Themer for Bricks","PluginURI":"https:\/\/advancedthemer.com\/","Version":"2.7.3","Author":"Maxime Beguin","AuthorURI":"https:\/\/advancedthemer.com\/","TextDomain":"bricks-advanced-themer","DomainPath":"\/lang","Network":false,"RequiresWP":"","RequiresPHP":"","UpdateURI":"","RequiresPlugins":"","Title":"Advanced Themer for Bricks","AuthorName":"Maxime Beguin"},"easy-code-manager\/easy-code-manager.php":{"Name":"Fluent Snippets","PluginURI":"https:\/\/fluentsnippets.com","Version":"10.34","Author":"Fluent Snippets","AuthorURI":"https:\/\/fluentsnippets.com","TextDomain":"easy-code-manager","DomainPath":"\/language","Network":false,"RequiresWP":"6.0","RequiresPHP":"7.3","UpdateURI":"","RequiresPlugins":"","Title":"Fluent Snippets","AuthorName":"Fluent Snippets"},"happyfiles-pro\/happyfiles-pro.php":{"Name":"HappyFiles Pro","PluginURI":"https:\/\/happyfiles.io","Version":"1.8.3","Author":"Codeer","AuthorURI":"https:\/\/codeer.io","TextDomain":"happyfiles","DomainPath":"\/languages","Network":false,"RequiresWP":"","RequiresPHP":"","UpdateURI":"","RequiresPlugins":"","Title":"HappyFiles Pro","AuthorName":"Codeer"},"toolset-blocks\/wp-views.php":{"Name":"Toolset Blocks","PluginURI":"https:\/\/toolset.com\/?utm_source=viewsplugin\u0026utm_campaign=views\u0026utm_medium=plugins-list-full-version\u0026utm_term=Visit plugin site","Version":"1.6.16","Author":"OnTheGoSystems","AuthorURI":"https:\/\/toolset.com","TextDomain":"toolset-blocks","DomainPath":"","Network":false,"RequiresWP":"","RequiresPHP":"","UpdateURI":"","RequiresPlugins":"","Title":"Toolset Blocks","AuthorName":"OnTheGoSystems"},"types\/wpcf.php":{"Name":"Toolset Types","PluginURI":"https:\/\/toolset.com\/?utm_source=typesplugin\u0026utm_campaign=types\u0026utm_medium=plugins-list-full-version\u0026utm_term=Visit plugin site","Version":"3.5.2","Author":"OnTheGoSystems","AuthorURI":"http:\/\/www.onthegosystems.com","TextDomain":"types","DomainPath":"","Network":false,"RequiresWP":"","RequiresPHP":"","UpdateURI":"","RequiresPlugins":"","Title":"Toolset Types","AuthorName":"OnTheGoSystems"}},"mu_plugins":{"fluent-snippets-mu.php":{"Name":"fluent-snippets-mu.php","PluginURI":"","Version":"","Description":"","Author":"","AuthorURI":"","TextDomain":"","DomainPath":"","Network":false,"RequiresWP":"","RequiresPHP":"","UpdateURI":"","RequiresPlugins":"","Title":"","AuthorName":""}},"dropins":[]},"theme":{"Name":"Bricks","ThemeURI":null,"Author":"\u003Ca href=\u0022https:\/\/bricksbuilder.io\/\u0022\u003EBricks\u003C\/a\u003E","AuthorURI":null,"Template":"bricks","Version":"1.10","TextDomain":null,"DomainPath":null},"extra-debug":{"types":{"add_resized_images_to_library":0,"images_remote":0,"images_remote_cache_time":"36","help_box":"by_types","hide_standard_custom_fields_metabox":"show","postmeta_unfiltered_html":"on","usermeta_unfiltered_html":"on"},"views":{"views_template_loop_blog":0,"wpv_bootstrap_version":1,"wpv_custom_conditional_functions":[],"wpv_custom_inner_shortcodes":[],"wpv_debug_mode":"","wpv_debug_mode_type":"compact","wpv_map_plugin":0,"wpv_show_hidden_fields":"","wpv_saved_auto_detected_framework":"","wpv_codemirror_autoresize":"","wpv_enable_pagination_manage_history":true,"wpv_enable_parametric_search_manage_history":true,"support_spaces_in_meta_filters":0,"allow_views_wp_widgets_in_elementor":0,"default_user_editor":"basic","default_wpa_editor":"basic","manage_meta_transient_method":"cron","editing_experience":"classic","disable_theme_settings":0},"installer":{"version":"3.1.3","repositories":{"wpml":{"api-url":"https:\/\/api.wpml.org\/","bucket-url":"not assigned","subscription":"","last-successful-subscription-fetch":"none"},"toolset":{"api-url":"https:\/\/api.toolset.com\/","bucket-url":"https:\/\/wptypes.s3.amazonaws.com\/toolset-bucket-27.json","subscription":{"key":"gUjkggFKiq","key_type":0,"data":{"subscription_type":5737,"expires":"2024-09-22","status":"1","notes":"resubscribed from #130671","order_id":"2646339","hasAutoRenewal":true},"registered_by":1,"site_url":"http:\/\/bricks-blueprint.local"},"last-successful-subscription-fetch":"2024-02-23 05:59:28"}},"instances":{"\/Users\/stvaughan\/Local Sites\/bricks-toolset\/app\/public\/wp-content\/plugins\/types\/vendor\/otgs\/installer\/installer.php":{"bootfile":"\/Users\/stvaughan\/Local Sites\/bricks-toolset\/app\/public\/wp-content\/plugins\/types\/vendor\/otgs\/installer\/installer.php","version":"3.1.3","args":{"plugins_install_tab":"1","repositories_include":["toolset","wpml"],"site_key_nags":[{"repository_id":"toolset","product_name":"Toolset"}]},"delegated":true}}}}}
Here is a sandbox site and you can auto-login to it using the following link:
- hidden link
Can you please upload the latest theme and also share the link to download the previous version of the theme and also share the steps I will have to follow to see the issue.
I have set the next reply to private which means only you and I have access to it.
Hi Minesh,
I went in to the login you provided and to get a quick start I set up a Home page with Bricks, so just click out of the dashboard onto the frontend where you will see the instructions below.
Here are the steps
• Click Edit in Bricks to access the builder
• From the Structure panel on the right, under Section/Container, click on the Rich Text element.
• Or just click into this text in the builder
• You will then see the Fields and Views button
• I installed the last version of Bricks where everything works. I did it this way as you need a licence and then you can just update Bricks to see the breaking changes.
Let me know if you need to step over the Bricks version again and I can send you on something via DropBox or We Transfer.
I found another reference ticket where the same issue was raised before almost four-five years ago:
- https://toolset.com/forums/topic/plugin-conflict-with-toolset-and-gravityperks-populate-anything/page/2/#post-1588411
This is related to conflict about underscore or lodash core JS that is causing the issue. Toolset enqueues WordPress library. The plugin/theme must be importing its own copy of lodash that is conflicting with WordPress default library.
When I checked for the solution fortunately I've workaround for you.
Can you please try to add the following hook to "Custom Code" section offered by Toolset:
add_action( 'wp_print_footer_scripts', 'func_js_contains_not_function_issue_fix', 1, 99 ); function func_js_contains_not_function_issue_fix(){ if(isset($_GET['bricks']) and $_GET['bricks']=='run') { wp_register_script( 'js-contains-issue-fix', '' ); wp_enqueue_script( 'js-contains-issue-fix' ); wp_add_inline_script( 'js-contains-issue-fix', ' _.contains = _.includes;' ); } }
Workaround shared here:
- hidden link
More info:
- https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code
Thanks Minesh, I'll give that a go. I did sneak into the linked login a minute ago and saw that you had resolved the issue. I'll revert back with a reply to say all's well and good.
I think we had that same issue in Divi as well so I will give it a go there as well.
Ok great - Glad to help and you're welcome to mark resolve this ticket.
Thanks Minesh,
I have tested this and it works