[Resuelto] View using custom shortcode not working on new page, but works on existing pages
This support ticket is created hace 3 años, 4 meses. There's a good chance that you are reading advice that it now obsolete.
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.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
We have a view that uses a registered custom shortcode as an attribute value. This works on other parts of the site, but doesn't work when including the view on new general WP pages built using WP Bakery. If WP Bakery is disabled the view parses fine. Existing pages built using WP Bakery that include the view also still work, this seems to only apply to newly built pages.
The view is called from within a wpv-conditional statement, which uses a custom function to test for a value. If true, display the view. Instead of parsing the view though the shortcode is output without executing.
When the view is called directly without the wpv-conditional it works, but only if there's a hardcoded value for the attribute instead of using the custom shortcode.
URL to test page where the view should be included but doesn't work: enlace oculto
URL to an existing page where the view is included and works: enlace oculto
URL to edit page in backend: enlace oculto
Notes:
- agentcookie() is a toolset-registered custom function that gets a userid value stored in a cookie
- [getagentcookie] is a toolset-registered custom shortcode that calls the agentcookie() function and returns the value
Yes I'm aware that it works if you hardcode the value and don't enclose it within the wpv-conditional — the problem is we can't hardcode the "agent" attribute, it needs to be generated from the custom shortcode. Furthermore, it needs to be inside of a conditional as we don't want to display the view if the custom function doesn't return a value.
- When the view is enclosed in wpv-condition it doesn't execute, it only displays the shortcode.
- When the view is NOT enclosed in a wpv-conditional and has the custom shortcode set as the 'agent' parameter, the server returns a internal 500 error
Something is happening between WP Bakery & Toolset with regards to the wpv-conditional the custom shortcode — but the exact same code is working elsewhere on the site.
Both agentcookie() and [getagentcookie] are registered within Toolset frontend content settings and work fine on Content Templates. It's only when I create a new page and use WPBakery that things don't work.
Specifically, the conditional seems to work fine with the custom function but the shortcode within that doesn't execute, it instead displays this on screen:
Both agentcookie() and [getagentcookie] are registered within Toolset frontend content settings and work fine on Content Templates. It's only when I create a new page and use WPBakery that things don't work.
Specifically, the conditional seems to work fine with the custom function but the shortcode within that doesn't execute, it instead displays this on screen:
Both agentcookie() and [getagentcookie] are registered within Toolset frontend content settings and work fine on Content Templates. It's only when I create a new page and use WPBakery that things don't work.
Specifically, the conditional seems to work fine with the custom function but the shortcode within that doesn't execute, it instead displays this on screen:
Both agentcookie() and [getagentcookie] are registered within Toolset frontend content settings and work fine on Content Templates. It's only when I create a new page and use WPBakery that things don't work.
Specifically, the conditional seems to work fine with the custom function but the shortcode within that doesn't execute, it instead displays this on screen:
Both agentcookie (custom function) and getagentcookie (custom shortcode) are registered within Toolset frontend content settings and work fine on Content Templates built using Toolset+WPBakery. It's only when I create a new basic WP page using WPBakery that things don't work.
Specifically, the conditional seems to work fine with the custom function but the shortcode within that doesn't execute, it instead displays this on screen:
Sorry for all the replies, the reply form kept reloading without showing my reply so didn't look like it was submitting. You can delete #2116589, #2116587, #2116585, #2116583.
It's the link I originally shared 9 days ago and again yesterday.
There are instructions and troubleshooting messages right on the page that I shared that explains everything further. enlace oculto
Here is a screenshot showing the shortcode being output instead of executed.
Also, I just release a new update for almost all Toolset plugins. We always recommend running your site with the latest stable release plugin version.
*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest officially released version. You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/