Jump to content
SaschaM

Problem with CDN Url in Impulse Section

Recommended Posts

SaschaM

Hello,

sorry. i got a problem on my site i can not fix myself, would be nice somebody can help.

I use:

- Platform 5 (latest) Pro

- Pagelines Framework (latest for Platform 5)

- keycdn (cdn enabler, cache enabler und optimus WebP)

- my site:  example

Problem:

The background image i use in the Impulse Section is not beeing replaced automatically if i specify a CDN Url. I need to put in the cdn url to the image manually. Why?

If you look in the button of the the side you see post grid section, where i have no problems. You also see there WebP Images working.

Now i can not really use the direct cdn url for the impulse background image, cause i want to benefit there from WebP Image also in the background as it works in post grid section.

How does it works with Impulse? The webP image for the background is ready to use.

Thank you.

 

 

 

 

 

 

 

 


Sascha Muhlen

South Spain

Share this post


Link to post
Share on other sites
Simon

when you select the image, it uses wp_upload_dir() to build the url, which you can always update with your cdn url.

We provided a filter for the shortcode it uses, the filter is pl_uploads_url so you could write a function to change the url automatically

 

Share this post


Link to post
Share on other sites
SaschaM

Can u help me out with this function? cause it already exists in post grid section and works there, also with all other plugins...i dont know how to code it

the problem ist u set  [upload-dir] before the filename. this does not automatically update to cdn url in other plugins yes but not in impulse.


Sascha Muhlen

South Spain

Share this post


Link to post
Share on other sites
Simon

impulse does nothing different, if the url field is using that shortcode it will use your uploads url, thats what its for.

Share this post


Link to post
Share on other sites
SaschaM

nope. its not working.

the background-image is not replaced by cdn url or by a webp image. please see attachment.

url for test:  URL for TEST

pagelines-cdn.jpg


Sascha Muhlen

South Spain

Share this post


Link to post
Share on other sites
Simon

post grid fetches the image from the featured image it does not use a shortcode, you do not add the url manually, its all automatic.

If you want the pl_uploads_url shortcode to change to cdn url then you will need to use the filter i already mentioned.

Share this post


Link to post
Share on other sites
SaschaM

no its about the impulse section, i do not place shortcodes its automatic from media library.


Sascha Muhlen

South Spain

Share this post


Link to post
Share on other sites
Simon
2 minutes ago, SaschaM said:

no its about the impulse section, i do not place shortcodes its automatic from media library.

https://cl.ly/3I1o0W1K1I2a

Yes I know it places shortcodes there, and the shortcode returns your uploads dir. It has no clue what cdn url you are using or 1 of 1000's of cdn plugins. All it does is return the url to your uploads dir. If you want that to be a cdn url then you need to do 1 of 2 things

  1. manually change it to your cdn url
  2. use the filter already mentioned to change the url in the shortcode.

Share this post


Link to post
Share on other sites
SaschaM

are there any examples for this function? and how about webp


Sascha Muhlen

South Spain

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • MrFent
      By MrFent+
      I wanted to share something I'm dealing with on my PageLines 5 website. The website is culturedfoodlife.com. I've seen this issue a few times, but it's always fixed itself without me really doing much, so I don't know how to troubleshoot. It'll start out with my page loading all wonky, due to scripts and stylesheets missing. I look at the page source, and towards the top, I see this line:
      <link rel='dns-prefetch' href='//www.group-ib.ru' />
      I have no idea what that website is, or why it's loading that line of code, and then further down, I see it again as the domain that tries to load all of my pagelines section style scripts:
      <link rel='stylesheet' id='pl-pins-css' href='https://www.group-ib.ru/…/plugins/pl-section-pins/style.css…' type='text/css' media='screen' />
      <script type='text/javascript' src='https://www.group-ib.ru/…/pl-sect…/script.infinitescroll.js…'></script>
      <script type='text/javascript' src='https://www.group-ib.ru/…/plugi…/pl-section-pins/isotope.js…'></script>
      <script type='text/javascript' src='https://www.group-ib.ru/wp-conte…/…/pl-section-pins/pins.js…'></script>
      Here's a screenshot: https://www.screencast.com/t/Nqk9YglUf
      So I get that this is why it's not displaying correctly on the front end, because these style scripts don't exist on group-ib.ru, and I have no idea why it's inserting group-ib.ru instead of my domain culturedfoodlife.com.It makes me think I'm being hacked. This seems to be affecting the styles and scripts of pagelines sections. Other plugins on my site load their scripts with the correct domain name.
       
      When I've seen this in the page, it usually fixes itself after a few minutes, but in this last case, it didn't fix itself until I started disabling plugins. I was trying to see if I could go through each plugin one by one to see if I could fine out anything. I disabled everything but all my pagelines plugins/sections, and the issue went away. Then when I re-enabled everything, the issue was still gone. So now I'm clueless as how to keep testing this. Any suggestions?
      The fact that disabling every plugin EXCEPT the pagelines plugins kind of make me think that the issue isn't with pagelines, but then again when the issue occurs, why does it only affect pagelines sections? Andrew Powers I could use some insight. Thanks.
    • jharri74
      By jharri74
      Hello, I want to create a form where a visitor can submit content/post from the front end. I did something very similar some years back using wp-types, CRED form with pagelines DMS. When i try to set this up in Platform 5, the CRED form generates but doesn't show. I get a blank page. In the browser's console window, i get the error: Uncaught Error: You cannot apply bindings multiple times to the same element.
      When i deactivate the PL plugin and change the theme, the form appears.
      I'm using Wordpress 4.8.2 and PL 5.1.7
      Thanks.
    • Bill Bernat
      By Bill Bernat+
      Hi, I'm using a series of Loops sections on our PL5 site (insights.adaptiva.com), and on one section, I'd ideally like the loops to link to external URLs that are defined in the post in WordPress. Is that possible?
    • uniworks
      By uniworks+
      Running WordPress 4.8.1  Unable to update to new versions of Pageline plugins (6 total). 
    • fabienfons
      By fabienfons+
      Hi,
      I have a big issue on my website with platform 5 (www.youtips.com)
      Very often, some pages don't display correctly, i need to refresh the page to view the correct display.
      Same thing on safari or chrome...
      Please, heeeeeeelp !
      Fabien
×