-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ACF, dynamic field in Shortcode element does not work #5214
Comments
Using the text element to display the grid did not work on my original development site. It could' find the grid and it looked like the name had been altered somehow. So what I'm entering enter the custom field is somehow being rewritten and no longer works. I can create a test page and use the same element with the same shortcodes and it works just fine. It's just the combination of ACF and the elements that fail. |
And now I suspect this is the issue |
If the shortcode has a space in it [the_grid name="Easter Week"] | No grid was found for: "Easter. |
The issue was in the render method, thanks. |
Shortcode widget: Fixed dynamic tags support, fixes #5214
Prerequisites
Description
I have a single template in which I'm using ACF fields to populate data. One is a shortcode for an Image Grid that is custom to each post. The ACF field is a text field, which I place the shortcode in.
This partially works as it inserts the shortcode for the first post. But it does not seem to grab the correct shortcode in each post. On each page, it's the first posts shortcode.
Steps to reproduce
Use CPT UI to create a post type
Use ACF and assign a custom text field to hold the shortcode text
Create a single page template and insert the shortcode element. Assign the custom field as the dynamic content.
The shortcode will be the code of the first post made for each post, instead of the shortcode entered in the in each post
I also created a fresh install and tried using shortcode element and a dynamic custom field as the shortcode source. It straight up doesn't work at all. Which means there is some element on the first site I ran into this problem on that is cached. I think it was an advanced fallback field that I filled and then deleted... that is still populating the grid on all the tour pages
Whats interesting is that using the shortcode element does not work. But in this demo page, using the shortcode in a text box does work. So I think I found a workaround while troubleshooting the issue, but this is still a problem I think.
http://wp1.wpmanagementservice.com/tours/tour-page-2/
Isolating the problem
Can't disable Woocommerce Since one of my ACF fields requires it
Can't test the issue without
Environment
== Server Environment ==
Operating System: Linux
Software: nginx/1.15.1
MySQL version: 5.5.5
PHP Version: 7.2.8
PHP Max Input Vars: 1000
PHP Max Post Size: 256M
GD Installed: Yes
ZIP Installed: Yes
Write Permissions: All right
Elementor Library: Connected
== WordPress Environment ==
Version: 4.9.7
Site URL: http://wp1.wpmanagementservice.com
Home URL: http://wp1.wpmanagementservice.com
WP Multisite: No
Max Upload Size: 256 MB
Memory limit: 256M
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
Language: en-US
Timezone: 0
Debug Mode: Inactive
== Theme ==
Name: Twenty Seventeen
Version: 1.6
Author: the WordPress team
Child Theme: No
== User ==
Role: administrator
WP Profile lang: en_US
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
== Active Plugins ==
Advanced Custom Fields
Version: 4.4.12
Author: Elliot Condon
== Debug ==
Errors:
TypeError: Cannot read property 'attributes' of undefined
at http://wp1.wpmanagementservice.com/wp-content/plugins/elementor/assets/js/frontend.min.js?ver=2.1.4 - 2:7460
2018-07-25 18:03 +00:00
x 4 times
The text was updated successfully, but these errors were encountered: