• Resolved lsvr

    (@lsvr)


    Hi,

    first, this is one great plugin! I really love.

    I am having an issue with the latest version (1.8.0). When registering a custom element, parameter “dynamic => true” no longer seems to work. So the element is always inserted as a static HTML instead of a shortcode. Since all my elements contain dynamic data, this makes them unusable. It worked flawlessly before. Is there some fix for this I’ve missed or is it just a bug?

    Thanks!
    Lubos

    • This topic was modified 7 years, 3 months ago by lsvr.
Viewing 1 replies (of 1 total)
  • Thread Starter lsvr

    (@lsvr)

    So I did more testing and it seems like the problem lies somewhere else. “dynamic => true” seems to be working after all in 1.8.0 and the element is inserted as a shortcode (as it should). However, when I insert the element, save the page and reload the Tailor (or close and open it again, it does not matter), I do not see the element on the front-end, instead I see an error message:

    "The element associated with shortcode <strong>tailor_name_of_my_shortcode</strong> could not be found".

    Notice the prefix – “tailor_”. However shortcode’s correct tag is just name_of_my_shortcode, without “tailor_” prefix. So it seems like Tailor is for some reason prefixing “tailor_” when calling a shortcode in the Front-end editor. Again, it worked in the previous version (1.7.10).

    I’ve tracked the issue into “includes/class-models.php” file. Line 938 in generate_models_from_html function:

    'tag' => 'tailor_' . $type,

    When I remove ‘tailor_’, it fixes my shortcodes, but breaks default Tailor shortcodes. So we need to fix this function to not to hardcode “tailor_” prefix for every shortcode tag.

    • This reply was modified 7 years, 3 months ago by lsvr.
Viewing 1 replies (of 1 total)
  • The topic ‘Dynamic shortcodes not working in 1.8.0’ is closed to new replies.