Jump to content

Archived

This topic is now archived and is closed to further replies.

flourishdesignstudio

Shortcode Breaking or not Displaying

Recommended Posts

flourishdesignstudio

Hello, 

I am having a problem with shortcode not working properly with the PL5 theme. I have been trying to insert shortcode for a specific plugin (Map List Pro) and it has worked when I am using DMS but not with PL5. When I insert the shortcode into the page content then none of the content (text, images, or map) will load on that page. Thinking that maybe a widget or straight HTML code would work better made me try inserting the shortcode into a widget (didn't work) as well as an embed section within PL5. The embed section worked in that I can look at the code and see that the map is there but nothing is actually displaying on the page.

I am also unable to edit the embed code section (added through PL shortcode into the content of the page) once I have put in the Map List Pro shortcode. Any thought as to a workaround or if the codes are somehow interfering with one another? You can see the page (and gap where the map is supposed to be loading) here: http://new.fingerlakesdistilling.com/where-to-buy

Thanks so much for any insight you are able to provide!

Share this post


Link to post
Share on other sites
Simon

Try in wp-admin PageLines settings under advanced ticking the alternative script loader.

Also, you have not added a map api key, your map will never load anyway without that.

Check the javascript console for your map errors.

Share this post


Link to post
Share on other sites
flourishdesignstudio

Thanks @Simon! I checked the advanced box that you referenced and double checked the API Key (it is optional with this mapping plugin - "Although optional, setting an API key allows you to track usage and make sure that you don't go over the usage limits (https://developers.google.com/maps/documentation/javascript/tutorial#api_key)." but the problem still persists. I had found a thread (attached link below) that looked like maybe there was an issue with the order CSS of inserted shortcode and found this error code within the console: "Uncaught Error: You cannot apply bindings multiple times to the same element."

Is any of that helpful? If there anything else I can try?

Thanks so much Simon :)

 

 

Share this post


Link to post
Share on other sites
Simon

Are you copying some html somewhere? There should never be multiple bindings. Only time ive ever seen this is when someone copied the html from one page into another thinking thats how you copy sections.

 

As for the maps API, as far as im aware earlier this year they made the use of a key compulsory.

Share this post


Link to post
Share on other sites
flourishdesignstudio

Hm, that is strange! I will look into get an API key....

I checked the code (screenshot below) and I don't think any strange styling came through or is interfering. Is there anything you want me to try that would further help in troubleshooting?

Screen Shot 2016-10-03 at 4.05.21 PM.png

Share this post


Link to post
Share on other sites
flourishdesignstudio

Ok, I was able to get the API key in place so that has been resolves but I am still getting the multiple bindings error. Any thoughts on what might cause that? Is there anything I can do that would help expedite the troubleshooting process?

Share this post


Link to post
Share on other sites
Simon

Your maps plugins is also using knockout, theres your problem

Share this post


Link to post
Share on other sites
flourishdesignstudio

Is there any way around that? We have been using this plugin with previous Pagelines themes and it would be extremely hard to implement a different plugin within the structure of their new site. Are there any workarounds that you know of?

Share this post


Link to post
Share on other sites
Simon

Pretty sure PL5 only does knockout binding in the sections it wont try and apply bindings to any other html elements.

Have you approached the plugins authors as its a supported premium plugin? PL5 of course is free to download from wordpress so they can easily test it. 

Share this post


Link to post
Share on other sites
flourishdesignstudio

I have tried to contact the plugin's author and an getting absolutely no response. Is there anything I can do to modify how the page load or uses JS that will help resolve the problem from the Pagelines end?

Share this post


Link to post
Share on other sites
Simon

You paid for a plugin and are getting no response at all?

Share this post


Link to post
Share on other sites
flourishdesignstudio

Yes, unfortunately it was bought through Code Canyon and the author is no longer providing support for the plugin so we are left with a system that they love, but now cannot use on the new PL system. I love the new PL but it is really frustrating that the map worked before and now that we upgraded it won't work. I just want both systems to work together in all their glory so we can showcase the best of both systems!

Share this post


Link to post
Share on other sites
Simon
Just now, flourishdesignstudio said:

Yes, unfortunately it was bought through Code Canyon and the author is no longer providing support for the plugin so we are left with a system that they love, but now cannot use on the new PL system. I love the new PL but it is really frustrating that the map worked before and now that we upgraded it won't work. I just want both systems to work together in all their glory so we can showcase the best of both systems!

ok open a ticket, provide me a link to download and a quick 'this is how you create a page that breaks' and i'll have a quick look.

Share this post


Link to post
Share on other sites
nandorj78

I'm having a similar issue with the maps section on DMS2.

The site was installed on a subfolder in another domain. The moment I went to wordpress settings and changed the url of the site to point to a new domain, this error occurred. If I change the wordpress setting back to the subfloder, it works.

Share this post


Link to post
Share on other sites
Simon
20 hours ago, nandorj78 said:

I'm having a similar issue with the maps section on DMS2.

The site was installed on a subfolder in another domain. The moment I went to wordpress settings and changed the url of the site to point to a new domain, this error occurred. If I change the wordpress setting back to the subfloder, it works.

It is a completely different matter. Only similar in having map in the name.

When you change the url you need to click save in wp-admin pl settings to rebuild all the urls and paths for sections.

Share this post


Link to post
Share on other sites

  • Similar Content

    • John Olsson
      By John Olsson+
      We're often working with ACF (https://www.advancedcustomfields.com/) that's great for user experience in the backend, 'cause we don't want out clients to be in the editor to much.
      So we want to be able to use shortcodes in the editor fields, regardless of section, THIS WOULD BE SO GREAT. Is there a way to fix this, it should open up som much more functionality.
      In ACF, the shortcode is for example: 
      [acf field="field_name"] ...for example, I want to att field_names value to display in a section, i understand I can make it in embed and so, but I want it in titles and options, the whole range.
      I know I can build my own sections, that we've done, but it's not very effective, and thats what PL5 is about.
      Any ideas on this, can Pagelines take this in the core? I guessing there are more than just ACF out there who can use this.

    • jojoking
      By jojoking+
      I have to admit to being baffled.
      I'm trying to embed a video (from my WP media library) within a WP post using the videobox section shortcode.
      The shortcode section popup only allows two items to be configured - the section type, in this case videobox - and a unique id. There's no URL or other parameters such as autoplay or loop which are available within the Pagelines editor.
      Whatever I put in the unique ID makes no difference to what is shown which seems to be a default video with stars or white noise on a black background.
      I assume I need to define this ID somewhere else, or maybe WP has done it for me?
      HELP!
       
      PS This is the page source generated when a shortcode is added within the WP post editor
      <!-- VideoBox | Section --> <section id="videobox_1675853156" class="pl-sn pl-col-sm-12 pl-col-sm-offset-0 pl-sn-videobox" data-object="PL_VideoBox" data-clone="1675853156" data-level="0"><div class="pl-sn-wrap"><div class="pl-sn-pad fix" data-bind="pledit: true" > <div class="video-highlight"><h3 class="video-title" data-bind="pltext: vb_title"></h3></div> <div class="pl-video-box" data-bind="plcallback: { vb_autoplay: vb_autoplay(), vb_loop: vb_loop(), vb_controls: vb_controls(), vb_video: vb_video()}" data-callback="videobox"> <video id="280414138" autoplay loop > <source src="https://www.handinhandmanchester.org.uk/wp-content/plugins/pl-section-videobox/default.mp4?r=280414138" type="video/mp4" /> No browser html5 video. </video> <script> jQuery('#280414138')[0].load(); </script> </div> </div></div></section> </div>  
      If I add a videobox section using the Pagelines page editor the page source generated includes my video:
      <!-- VideoBox | Section --> <section id="videobox_udvu4uz" class="pl-sn pl-col-sm-12 pl-col-sm-offset-0 pl-sn-videobox" data-object="PL_VideoBox" data-clone="udvu4uz" data-level="0"><div class="pl-sn-wrap"><div class="pl-sn-pad fix" data-bind="pledit: true" > <div class="video-highlight"><h3 class="video-title" data-bind="pltext: vb_title"></h3></div> <div class="pl-video-box" data-bind="plcallback: { vb_autoplay: vb_autoplay(), vb_loop: vb_loop(), vb_controls: vb_controls(), vb_video: vb_video()}" data-callback="videobox"> <video id="429558737" autoplay loop > <source src="https://www.handinhandmanchester.org.uk/wp-content/uploads/2017/04/HIHWelcome.mp4?r=429558737" type="video/mp4" /> No browser html5 video. </video> <script> jQuery('#429558737')[0].load(); </script> </div> </div></div></section>  
    • bnapoli
      By bnapoli+
      On my site www.anewbeginning.com the "toggle" function mysteriously stopped working.  I have tried all browsers, tried disabling plugins, removing all the relevant CSS but still cant understand why it isn't working.
      The toggle is placed on this page: http://anewbeginning.com/?page_id=15965 and http://anewbeginning.com/?page_id=10779 but it does not display.
      On my other Platform5 websites, that exact code works fine: see here http://4aa.d11.myftpupload.com/?page_id=123
      Code is the same. Please help, thank you!
    • Samuel Costa - UDF
      By Samuel Costa - UDF+
      Hi.
      I need a shortcode activate a popup windows with contact form. It is possible without code?
      Link: https://www.udf.org.br/lancamentos/curso-mulher-que-prospera/
      Button: FAÇA SUA INSCRIÇÃO.
      Tks
    • chamois_blanc
      By chamois_blanc+
      It would be nice if all the PL5 shortcodes had a css class option to be able to add classes to the element generated by the shortcode. I'm aware it's usually possible to hack a class in by doing something like size="1x <my_class>". But a clean solution would be nice.
×