ThemeFuse / Unyson

A WordPress framework that facilitates the development of WP themes
http://unyson.io
922 stars 218 forks source link

data-ajax-url and data-template-path malformed attributes #3543

Closed almanzma closed 6 years ago

almanzma commented 6 years ago

[ data-ajax-url and data-template-path malformed attributes ]

We recently went through a backup/copy of an entire site. In moving the site to Production from Staging, we moved MYSQL database content, but in tweaking the fields to reflect the new URL from "staging" to "www", we may have added code in one that malformed a URL for calendar events (and maybe other content items).

Here is the CALENDAR code with the proper attributes on Staging: <div id="calendar" data-extends-ajax-params="{&quot;events_category&quot;:&quot;&quot;,&quot;data_provider&quot;:&quot;events&quot;}" data-ajax-url="http://staging.example_url.com/wp-admin/admin-ajax.php" data-template="month" data-template-path="http://staging.example_url.com/wp-content/plugins/unyson/framework/extensions/shortcodes/shortcodes/calendar/views/" data-first-day="2" class=" wrapp_calendar fw-shortcode-calendar-wrapper shortcode-container tf-sh-1aee6ca3919b2026d168398734b57092" >

Which should look like this (attaching first image): image

And here it is bombing out with malformed attributes on WWW: <div id="calendar" data-extends-ajax-params="{&quot;events_category&quot;:&quot;&quot;,&quot;data_provider&quot;:&quot;events&quot;}" data-ajax-url="http://<a href="http://www.example_url.com/wp-admin/admin-ajax.ph">www.example_url.com/wp-admin/admin-ajax.ph</a>p" data-template="month" data-template-path="http://<a href="http://www.example_url.com/wp-content/plugins/unyson/framework/extensions/shortcodes/shortcodes/calendar/views">www.example_url.com/wp-content/plugins/unyson/framework/extensions/shortcodes/shortcodes/calendar/views</a>/" data-first-day="1" class=" wrapp_calendar fw-shortcode-calendar-wrapper shortcode-container tf-sh-2b82a384b14e2cae9dcf39c3371a5e78" >

Which ends up looking like this: image

I've looked into view.php, where the shortcodes are being called through: <div id="calendar" <?php echo fw_attr_to_html( $wrapper_atts ); ?> <?php echo ($data_animation); ?>> ... but I can't find the fix.

I can tell there's an issue with the path inside the the "data-template-path" attribute, but I can't find where to change it on the database. I also would like to see if I can fix this instead of exporting all the data again, and importing it again without having to tweak it. That was painful.

Thanks for help in advance.

almanzma commented 6 years ago

FYI, we are using the Philanthropy Parent theme and on the latest Unyson and WP 4.9.7.

almanzma commented 6 years ago

WE GOT IT FIXED. The culprit was an old plugin that was making links automatic on text. We disabled that plugin.

Thank you. I'll leave it up, Admins, if you believe it will help someone else.