Skip to content

ACF, dynamic field in Shortcode element does not work #5214

Closed
@seanvandermolen

Description

@seanvandermolen

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest stable version of Elementor.

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

  • This bug happens with only Elementor plugin active (and Elementor Pro).
    Can't disable Woocommerce Since one of my ACF fields requires it
  • This bug happens with a default WordPress theme active.
    Can't test the issue without
  • I can reproduce this bug consistently using the steps above.

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

Custom Post Type UI
	Version: 1.5.8
	Author: WebDevStudios

Elementor
	Version: 2.1.4
	Author: Elementor.com

Elementor Pro
	Version: 2.0.16
	Author: Elementor.com

The Grid
	Version: 2.6.60
	Author: Themeone

== 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/mergedIndicates when a Pull Request has been merged to a Release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions