amarinediary / WordPress-simple-URL-based-breadcrumb

🍞 A non-invasive WordPress unofficial plugin, minimalist and SEO friendly. both lightweight and lightning fast, adding URL based breadcrumb support. Plug-and-play, with no required configuration.
https://stackoverflow.com/a/67453887/3645650
Creative Commons Zero v1.0 Universal
27 stars 5 forks source link

Bug?! Livesite displays slug as site title #10

Closed nikolailehbrink closed 2 years ago

nikolailehbrink commented 2 years ago

Hello again. I use localwp as my development tool and within the tool you can create live links to allow other people to access the local site through a proxy on a real domain. I am currently developing a website using your plugin and on my local server and have now created a livelink for the first time to test on my cell phone. In doing so, I noticed that the active page is not outputting correctly on the breadcrumbs. Instead of the post title "Interview with our developer Leon" it just uses the slug "Interview leon". So the whole path is now called Home -> News -> Interview leon while on my local environment it is correctly called: Home -> News -> Interview with our developer Leon. Why does the plugin behave like this, or does it not matter for now because it's just a livelink?

amarinediary commented 2 years ago

Hi @nikolailehbrink, I'm not familiar with localwp tho from the looks of it I would say this might be related to how they generate a live link. I would tend to think that this issue wouldn't be reflected once live. See: Localhost development.

Here is a bunch of questions just to be sure: Regarding the live link:

1) Even tho the breadcrumb isn't being displayed correctly, is the url associated with the last crumb (the article crumb) correct ? Can you navigate to it? 2) Is there any special character in your article title? 3) Is there query parameter in your article url? eg: ?foo=bar 4) Can you paste your the_bread function ?`

Could you dump the following server and execution environment information too, from the article page on the live site: var_dump( $_SERVER['HTTP_HOST'] ); var_dump( $_SERVER['REQUEST_URI'] );

5) Additionally could give me the full end url from the article in question (from the live link)?

Keep in mind to hide/modify any information you don't want public in the url and in the dump.

nikolailehbrink commented 2 years ago

Hi! Sorry for the late response! I will just test it, when the site goes live and if there is a bug I will write again! I think it's because of how the live links are programmed. Thanks for the response!