Jump to content

Archived

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

caspersjan

PL Accordion shortcode not opening on RTL page?

Recommended Posts

caspersjan

Hello, 

I am encountering a problem I can't seem to solve. On TRL pages, the PL accordion shortcode displays the accordion headers, but does not open up the accordions. On the English page it works well. Here are two pages (first LTR, then RTL):

http://animatinglibraries.com/?p=7715

http://animatinglibraries.com/?p=7744&lang=ar

I looked carefully for any mistakes and recreated it a few times. The accordions don't want to open on the RTL page. When I set them to be open by default, they are open (so the content is really there), but when I close them, they don't open again.

 

Have you any idea what might be the issue? It could be a mistake on my side but I can't find what it is. Here are the two segments with the shortcode. Just in case it makes a difference: They are all within one post - on the LTR page the Arabic part is hidden with CSS, on the RTL page the English is hidden.

 

Thank you for your help, I am always glad that you are there to assist. So far all my woes have been sorted out - I hope this one will, too! I used a different shortcode plugin and it worked but it did not look as nice the PL one and it would be great to stay within the system! Yours faithfully, Jan.

 

 

Here is the shortcode section on the LTR page (English). It works perfectly (and beautifully!):

[pl_accordion name="activity1"][pl_accordioncontent name="activity1" class="activity" number="1" heading="INFO" open="no"] [row] [span3] Group size 11 - 15 Age Secondary School Gender Mixed Profession Pupils [/span3] [span3] Sessions Session duration 2 1/2 hours Type Introduction Level Beginner [/span3] [span6] Report In this workshop, members of the library youth group learned how to make cut-out models and created their own little universe from paper. [/span6] [/row] [/pl_accordioncontent] [pl_accordioncontent name="activity1" class="activity" number="2" heading="PHOTOS" open="no"] [row][span6] WORKSHOP IMPRESSIONS [justified_image_grid ids=7698,7699,7700,7701,7702,7703,7704,7705,7706,7707,7708,7709,7710,7711,7712,7713,7714 preset=5 row_height=100 height_deviation=25 prettyphoto_social=no lightbox=colorbox mobile_lightbox=no ][/span6] [span6] MODELS AND SETS [justified_image_grid ids=7723,7724,7725,7726,7727,7728,7729,7730,7731,7732,7733,7734,7735,7736,7737,7738,7739,7740,7741,7742 preset=5 row_height=100 height_deviation=25 prettyphoto_social=no lightbox=colorbox mobile_lightbox=no ][/span6][/row] [/pl_accordioncontent] [pl_accordioncontent name="activity1" class="activity" number="3" heading="VIDEO" open="no"] No video [/pl_accordioncontent][/pl_accordion]

 

The same shortcode (cut and pasted, in fact, the only difference being a few translated headings) doesn't open on the RTL page (Arabic - bilingual setup with WPML):

[pl_accordion name="activity2"][pl_accordioncontent name="activity2" class="activity" number="1" heading="INFO" open="no"] [row] [span6] Report In this workshop, members of the library youth group learned how to make cut-out models and created their own little universe from paper. [/span6] [span3] Sessions مدة اللقاءات 2 1/2 hours نوع الورشة مقدمة مستوى الورشة Beginner [/span3] [span3] حجم المجموعة 11 - 15 الفئة العمرية مدارس ثانوية الجنس مختلط المهنة تلاميذ [/span3] [/row] [/su_spoiler] [/pl_accordioncontent] [pl_accordioncontent name="activity2" class="activity" number="2" heading="صو" open="no"] [row] [span6] ر : نماذج ومواقع [justified_image_grid ids=7698,7699,7700,7701,7702,7703,7704,7705,7706,7707,7708,7709,7710,7711,7712,7713,7714 preset=5 row_height=100 height_deviation=25 prettyphoto_social=no lightbox=colorbox mobile_lightbox=no ][/span6] [span6] ر: انطباعات من الورشات [justified_image_grid ids=7723,7724,7725,7726,7727,7728,7729,7730,7731,7732,7733,7734,7735,7736,7737,7738,7739,7740,7741,7742 preset=5 row_height=100 height_deviation=25 prettyphoto_social=no lightbox=colorbox mobile_lightbox=no ][/su_tab] [/span6][/row] [/pl_accordioncontent] [pl_accordioncontent name="activity2" class="activity" number="3" heading="صو" open="no"] No video [/pl_accordioncontent][/pl_accordion]

Share this post


Link to post
Share on other sites
Danny

Hi,

 

The only thing I can think of is that the plugin you're using for multilingual is at fault. For example, your logo image has a rather odd URL which is causing it to 404. I recommend you contact the plugin author and ask them to investigate.

 

Here is the URL for your logo image that has the 404 error - http://animatinglibraries.com/?lang=ar%2Fwp-content%2Fuploads%2F2014%2F04%2FANIMATINGLIBRARIESTitleMaskedMENU29.png


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
caspersjan

Dear Danny, the broken logo image is indeed a conflict, it started after the upgrade to DMS. In the Editor, on RTL pages the Pagelines site URL is not accepted, it needs to the actual URL.

i.e. not

[pl_site_url]/wp-content/uploads/2014/04/ANIMATINGLIBRARIESTitleMaskedMENU29.png

but

http://animatinglibraries.com/wp-content/uploads/2014/04/ANIMATINGLIBRARIESTitleMaskedMENU29.png

As you can see, here it is fixed on the linked page I sent you:

http://animatinglibraries.com/?p=7744&lang=ar

 

My guess is that this is left over from the early problems with RTL in the Editor which was flipped around and unusable for the first few months of DMS. I had a lively correspondence with yourself and your colleagues at the helpdesk and developers, and in the end it was mostly sorted, the only thing that's not working is [pl_site_url] for images - the original URL is required. 

In the case of the accordion I think it must be somewhere at the Pagelines end as two other accordion shortcodes worked without problems and I suppose they are all quite similar. I just trialled a few other shortcodes, they display well (as do PL buttons, for example). And the accordion is there, too, it just doesn't open.

 

Not to worry. If it can't be worked out I'll use another shortcode plugin. It's just always nicer to stay within DMS. Thank you anyway for your effort. Yours faithfully, Jan.

Share this post


Link to post
Share on other sites
caspersjan

Dear Danny, or could there perhaps be a problem with having two accordion shortcodes in one post? That is what I have - I just hide the English when displaying the Arabic, and vice versa. I took away the CSS so both are displayed, and the first accordion is working - on the RTL page. Is it possible to have two accordions in one post? I did give them different names (but the same class...). Thanks for your help - maybe it can be sorted out, otherwise I'll get another shortcode to do it. Greetings, Jan.

Share this post


Link to post
Share on other sites
caspersjan

Dear Danny, I worked it out! No RTL problems - it's just an instinctive reaction to blame those on everything. This is what happens: When I create two accordions, with different names, the second displays but doesn't open. The problem is the pl_accordioncontent numbers. If I have three headers in each accordion (e.g. accordion1, accordion2) I can't number the pl_accordioncontent number="1", number="2", number="3" for one and the same for the other. The second accordion has to have numbers number="4", number="5", number="6", in spite of the different accordion name. I don't know if that is a bug or design, but for me it is working now. I should have tested this before bothering you! But I had the first accordion hidden, even from myself, so I did not think of this solution earlier. Perhaps it is useful in general, in case people want to have multiple accordions. 

Thank you for your patience, yours faithfully, Jan.

Share this post


Link to post
Share on other sites
Danny

Hi Jan,

 

Nice testing skills, I will bring this to our developers and see if it is indeed a minor bug. Also, thanks for informing us the issue has been resolved.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
caspersjan

Dear Danny, I always try to do my best to work things out. The advice I received from you and your colleagues in the past has been great for my Wordpress learning. I remember the day before I even knew of CSS and your patience then. As always I am glad to know that I have this forum and your team to fall back on. Thank you for your work - and let me know if the developers indeed find a bug so I can adjust my workaround accordingly... Yours faithfully, Jan.

Share this post


Link to post
Share on other sites

  • Similar Content

    • jeomiland
      By jeomiland+
      Howdi
      Am following a couple of tutorials about making custom shortcodes and making them available in your site. They recommend to make a "my_custom_shortcode.php" file in wp-content folder so it survives Core wordpress and Theme updates. However, they then say to place a couple lines of code in the theme functions.php file. The one in pl-framework theme folder does not look like the best place to put that code and I can't see a shortcodes.php file in the theme.
      So where is the best place and way to add custom shortcodes to a Pl5 project?
      Thanks
      john erik
    • Jason
      By Jason+
      Any chance you can add anchors to the tabs shortcode (similar to ultimate shortcode plugin)?
      Just annoying having to use that plugin rather than pagelines one
       
      <h2>Tabs anchors</h2> [su_tabs] [su_tab title="Tab 1" anchor="First"] Tab 1 content [/su_tab] [su_tab title="Tab 2" anchor="Second"] Tab 2 content [/su_tab] [su_tab title="Tab 3" anchor="Third"] Tab 3 content [/su_tab] [/su_tabs] Use next links to switch this tabs <a href="#First">Open tab 1</a> | <a href="#Second">Open tab 2</a> | <a href="#Third">Open tab 3</a>  
    • Jason
      By Jason+
      Any solution to map section not rendering inside tab shortcode.
      (Map sits inside 3rd tab so map not visible on page load)
      Also this just seems to effect the map section. Map shortcode renders fine.
      I want to use the map section for finer control over markers and locations
      Renders fine if in first page.
       
      Thanks
    • 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!
    • micstepl
      By micstepl+
      Pagelines seems to "disallow" the (a) usage and/or (display) of shortcodes.
      Specifically I need shortcodes in "description" of "tag/catagory" in order to display images/fontawsome, before a category.
      Please can you provide a fix for me to allow. 
×