wp2static icon indicating copy to clipboard operation
wp2static copied to clipboard

PLACEHOLDER.wpsho randomly in static source code

Open LevyBytes opened this issue 7 years ago • 10 comments

After rendering a static version of the site, I am finding random http://PLACEHOLDER.wpsho or PLACEHOLDER.wpsho throughout internal URLs. There's not a great number, but they are consistently in the same places after rendering the site.

LevyBytes avatar May 05 '19 02:05 LevyBytes

Thanks D,

Working on overhaul for this in version 7. I've got successful offline ZIP exports in latest dev version for one test site, a bit more work to go to test all edge cases.

For meantime, you may check what the original URLs are that are failing to be rewritten. They may be //link style protocol-relative, which is a definite issue in 6.6.5

leonstafford avatar May 05 '19 04:05 leonstafford

If it helps, examples from the crawl log

Adding discovered URL: http://PLACEHOLDER.wpsho/wp-content/themes/Impreza/css/style.min.css
Adding discovered URL: http://PLACEHOLDER.wpsho/wp-content/themes/Impreza/css/responsive.min.css
Adding discovered URL: http://PLACEHOLDER.wpsho/wp-content/themes/Impreza/framework/js/vendor/magnific-popup.js
Adding discovered URL: http://PLACEHOLDER.wpsho/wp-content/themes/Impreza/js/us.core.min.js
Adding discovered URL: http://PLACEHOLDER.wpsho/wp-content/themes/Impreza/framework/js/vendor/owl.carousel.js

Each Memory allocated by crawl script line, is usually followed at some point by a couple of these placeholder.wpsho lines until the next memory allocated by crawl line. It's very consistent for the min.css file urls and randomly (I guess based on how it crawls) for the others referenced above.

All local development. I'm using Wordpress multisite on WAMP server, using local network IP instead of localhost since it has it's own PC and I develop from whatever PC on the local network. I am a pro version customer btw. Thank you

P.S. the local network IP ends up in the static output in a few places that I search for and manually edit out.

LevyBytes avatar May 05 '19 04:05 LevyBytes

Hi @LevyImage , can you please attach the before/after code snippets, where the URLs didn't get replace properly? Doing some work on this area now and should be to solve it

leonstafford avatar May 08 '19 08:05 leonstafford

I am sending you an email reply with the entire zips (under 50MBs each) so you can see exactly this and all other issues I've been facing working localhost and Wordpress Multisite for getting things to work. In about 5 mins will send you an email with both zips.

LevyBytes avatar May 08 '19 09:05 LevyBytes

Thanks. If a full site backup, I can properly debug that when back at workstation on the 12th. For now, I can just work on specific before/after code snippets to ensure those are being processed properly

leonstafford avatar May 08 '19 09:05 leonstafford

Email sent, no they're just static versions. But here are some examples in some JS files

http:\/\/PLACEHOLDER.wpsho\/wp-admin\/admin-ajax.php
$us.templateDirectoryUri='//PLACEHOLDER.wpsho/wp-content/themes/Impreza

LevyBytes avatar May 08 '19 09:05 LevyBytes

Thanks D, can you please give me the surrounding source code from the original site and the same for that above block? The surrounding tags may be relevant and the original source is what I really need to see why it's not detecting/rewriting it properly. Cheers

leonstafford avatar May 08 '19 09:05 leonstafford

Hi @leonstafford!

Before:

<!DOCTYPE html>
  <html lang="pt-BR">
  <head>
  <meta charset="UTF-8">
  <title>WeBoost Marketing</title>
  <meta name='robots' content='noindex,follow' />
  <link rel='dns-prefetch' href='//weboost.clicksites.net.br' />
  <link rel='dns-prefetch' href='//s.w.org' />

After:

<!DOCTYPE html>
<html lang="pt-BR"><head><meta charset="UTF-8"><title>WeBoost Marketing</title><meta name="robots" content="noindex,follow"><link rel="dns-prefetch" href="http://PLACEHOLDER.wpsho"><link rel="dns-prefetch" href="//s.w.org">

alexfares avatar May 19 '19 00:05 alexfares

Big overhaul of rewriting in v7. Available in develop branch or in early development release here:

https://github.com/WP2Static/wp2static/releases/tag/7.0-build0002

Please let me know any remaining rewriting issues you encounter on that

leonstafford avatar May 21 '19 07:05 leonstafford

any update?

Bonobomagno avatar Jul 22 '19 12:07 Bonobomagno