Wrong URL in javascript

Hello…

A friend of mine is using Podlove Web Player 5 in Wordpress using Bridge Theme. When we are trying to display the player, nothing happens. When we look into the browser console, we can see, that there is a double slash in the URL that leads to the problem:

…/wp-json/podlove-web-player/shortcode/publisher//20534

When we remove the double slash, wp-json delivers the correct answer. We have no idea where the second slash comes from. I disabled all other plugins and even changed to WP default Twenty Twenty theme - with no effect.

Any ideas?

Cheers,
Guenter

Hey Guenter,
can you share a link so I can have a look?

Yes:

Also can you share me what version you have installed?

Sure. Thank you. The latest ones:

Podlove Podcast Publisher 3.1.0
Podlove Web Player 5.3.1

Strange. It should load Player Version 5.3.0 but requests 5.1.4. Are there any caching plugins active that may need to be flushed?

The website uses WP-Rocket. I flushed it many times… and now again for you. Any change?

From the look of the error message there seems to be two problems:

  1. it inserts an addional / in the url
  2. it does not use the correct path of the plugin for the includes.

Both problems are probably based on the same problem: if a / is inserted at a wrong place, (1) has the additional one and the path of (2) is reset to the website root.

Guenter

PS: Last time I tried to fix the problem I downgraded publisher and player and upgraded them later on again. I might have forgotten to flush the cashe.

Ok, now it requests the correct version (5.3.0). It still falls back to an invalid base url. That might also cause the issues with the API paths. Is there some url rewrite in place or any other kind of plugin that is used to change the base path?

Not that I know of. I already set the .htaccess file to basic wordpress as well as deactivated all plugins - with no difference. I also changed the theme back to twenty twenty - no change here, either.