michaeltcarlson
Forum Replies Created
-
Forum: Plugins
In reply to: [Data Tables Generator by Supsystic] Unable to embed a shortcode in a cellHi there again,
I’ve determined that the error you see (and have so kindly provided) is caused between a conflict with the table and the aforementioned header script, which is required in order to populate shortcode values.The script is provided by my marketing automation service, and cannot be modified.
Therefore I’m going to redesign the page to present the salient information outside of a table.
I appreciate the time you’ve taken to assist me; and again I love the plugin.
Cheers,
MCForum: Plugins
In reply to: [Data Tables Generator by Supsystic] Unable to embed a shortcode in a cellHello @supsystic,
I deactivated all cache plugins, the result is the same, the table will not render.
I replaced the custom shortcodes with standard (user) shortcodes. The table rendered just fine.
Will you PLEASE answer my question?????
Again, my question is:
Is there something about the format of the custom shortcodes- [sc name=”shortcode”] that is causing the table to fail to render? Could it perhaps be the presence of quotes within the bracket?MC
- This reply was modified 7 years, 4 months ago by michaeltcarlson.
Never you mind…
I figured it out!
Thanks,
MCForum: Plugins
In reply to: [Data Tables Generator by Supsystic] Unable to embed a shortcode in a cellWhile waiting I fiddled with the header script and got the page to render. The table will render without the custom short codes, but when include it will not. I’ve tested this with and without plugins active, and with and without page scripts in place.
The issue is not an conflict with another application or script. Quite simply, when I place a custom shortcode, e.g., [sc name=”my_shortcode”] in a table cell, the table will not load. If, instead of the custom shortcode I place text, the table renders perfectly.
For your viewing pleasure:
Page without custom shortcodes in table (works fine):
https://prisonfamilyaid.com/thank-you-with-table-no-shortcodes/?email=mcarlson%40smbcircle.com&from=mcarlson%40smbcircle.com&meta_message=1001&name=Test%20AWeber&unit=awlist4837206Page WITH custom shortcodes in table (won’t render):
https://prisonfamilyaid.com/thank-you-table/?email=mcarlson%40smbcircle.com&from=mcarlson%40smbcircle.com&meta_message=1001&name=Test%20AWeber&unit=awlist4837206Again, my question is:
Is there something about the format of the custom shortcodes- [sc name=”shortcode”] that is causing the page render failure. Could it perhaps be the quotes?MC
Forum: Plugins
In reply to: [Data Tables Generator by Supsystic] Unable to embed a shortcode in a cellHi @supsysticom,
As per your request, I deactivated/reactivated all plugins. No conflicts. Phew!Took a look at the page itself and found the source of the page load error… The page has a script in the header that captures inbound URL parms, which in turn are populated via the custom shortcode inserted in the Syosystic table. Here’s the script:
<script type=”text/javascript”>
var formData = function() { var query_string = (location.search) ? ((location.search.indexOf(‘#’) != -1) ? location.search.substring(1, location.search.indexOf(‘#’)) : location.search.substring(1)) : ”;
var elements = [];
if(query_string) {
var pairs = query_string.split(“&”);
for(i in pairs) {
if (typeof pairs[i] == ‘string’) {
var tmp = pairs[i].split(“=”);
var queryKey = unescape(tmp[0]);
queryKey = (queryKey.charAt(0) == ‘c’) ? queryKey.replace(/\s/g, “_”) : queryKey;
elements[queryKey] = unescape(tmp[1]);
}
}
}
return {
display: function(key) {
if(elements[key]) {
document.write(elements[key]);
}
else {
document.write(“<!–Not Applicable–>”);
}
}
}
}
(); </script>Not sure why this would throw an error. Thoughts?
Here’s a test link:
https://prisonfamilyaid.com/thank-you-table/?email=mcarlson%40smbcircle.com&from=mcarlson%40smbcircle.com&meta_message=1001&name=Test%20AWeber&unit=awlist4837206Forum: Plugins
In reply to: [Data Tables Generator by Supsystic] Unable to embed a shortcode in a cellGood to know. Thanks!
Forum: Plugins
In reply to: [Data Tables Generator by Supsystic] Unable to embed a shortcode in a cellHiya @supsysticom,
Thanks for the response. I’m happy to provide more detail.
When defining a custom shortcode I use a fairly popular plugin, WordPress Shortcoder. (https://www.ads-software.com/plugins/shortcoder/).
With WP Shortcoder installed a user is able to create custom shortcodes by interacting with a UI in WP–> Settings. To create a shortcode, you:
Give a name for the shortcode
Paste the HTML/Javascript as content
Save
Insert the shortcode [sc name=”my_shortcode”] in your post/page.
Voila ! You got the HTML/Javascript in your post/page.Here’s a screenshot of of the WP Shortcoder UI. The example is one of the shortcodes I want to place in a Supsystic table cell:
https://www.dropbox.com/s/zx6uakdps2z89md/Shortcoder%20UI.PNG?dl=0
Here’s the given table in Supsystic’s Editor mode:
https://www.dropbox.com/s/6fpom5d8qzpfa4p/Table.PNG?dl=0
I placed the table on a page…
https://www.dropbox.com/s/x3my67debd4s17n/Table%20Page.PNG?dl=0
…but after doing so the page fails to load.
https://www.dropbox.com/s/w5sl2uwfva48yav/No%20Page%20Load.PNG?dl=0
Before contacting you, I needed to confirm that the action of placing the custom shortcode within a Supsystic table was the root cause of the page load. So I cloned the page and placed the custom shortcodes directly on the page (not in a table). They function properly:
Page without table (Edit Mode):
https://www.dropbox.com/s/vttpbhr41ue8zrf/Thank%20You%20Page%20No%20Table%20-%20Edit.PNG?dl=0Page without table (View Mode):
https://www.dropbox.com/s/x4j2s739yv3lt4k/Thank%20You%20Page%20No%20Table%20-%20View.PNG?dl=0Accordingly and for your reference, here are links where you can compare the page with the table to a page without it:
Live Sample (Page With Table):
https://prisonfamilyaid.com/thank-you-table/?email=mcarlson%40smbcircle.com&from=test%40test.com&meta_message=1001&name=Test%20JavaScripts&unit=awlist4837206Live Sample (Page Without Table):
https://prisonfamilyaid.com/thank-you/?email=mcarlson%40smbcircle.com&from=test%40test.com&meta_message=1001&name=Test%20JavaScripts&unit=awlist4837206Finally I have other shortcodes in other Supsystic tables that work splendidly. The have the typical shortcode spelling, i.e. [shortcode]. There’s something about the format of the custom shortcodes- [sc name=”shortcode”] that is causing the page render failure. Could it perhaps be the quotes?
Cheers,
MC