elementor / wp2static

WordPress static site generator for security, performance and cost benefits
https://wp2static.com
The Unlicense
1.42k stars 266 forks source link

7.1.6 Ruins layout when using Elementor. (Ignoring plugins folder for scripts?) #740

Open TomLewis opened 3 years ago

TomLewis commented 3 years ago

This is what the website looks like on Wordpress with Elementor as the designer.

Screenshot_2021-01-09 Amanda Cowie - RTT Hypnotherapist in Tendring(1)

After exporting with the latest wp2static, breaks all layout.

Screenshot_2021-01-09 Amanda Cowie - RTT Hypnotherapist in Tendring

Depending on how fast you read your GitHub messages; Development URL:

https://amandacowiehypnotherapy.clactonwebdesign.com/

Live URL where its hosted on static netlify. https://amandacowiehypnotherapy.com/

But im going to have to act pretty fast to repair this, So far a job that should have taken 20 mins max to do, has taken me 2 days to try and get wp2static not only installed, but working and now formatting.

Im sure I mentioned there were issues with Elementor before?

I think its just ignoring scripts in the /plugins folder. In the Dev ConsoleI can see;

Loading failed for the <script> with source “https://amandacowiehypnotherapy.com/wp-content/plugins/wp-serverless-forms/assets/js/main.js?ver=5.6”.
Loading failed for the <script> with source “https://amandacowiehypnotherapy.com/wp-content/plugins/elementor/assets/lib/font-awesome/js/v4-shims.min.js?ver=4.3.10”.
Loading failed for the <script> with source “https://amandacowiehypnotherapy.com/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js”.
Loading failed for the <script> with source “https://amandacowiehypnotherapy.com/wp-content/plugins/elementor/assets/js/frontend-modules.min.js?ver=3.0.16”.
Loading failed for the <script> with source “https://amandacowiehypnotherapy.com/wp-content/plugins/elementor/assets/lib/dialog/dialog.min.js?ver=4.8.1”.
Loading failed for the <script> with source “https://amandacowiehypnotherapy.com/wp-content/plugins/elementor/assets/lib/waypoints/waypoints.min.js?ver=4.0.2”.
Loading failed for the <script> with source “https://amandacowiehypnotherapy.com/wp-content/plugins/elementor/assets/lib/swiper/swiper.min.js?ver=5.3.6”.
Loading failed for the <script> with source “https://amandacowiehypnotherapy.com/wp-content/plugins/elementor/assets/lib/share-link/share-link.min.js?ver=3.0.16”.
Loading failed for the <script> with source “https://amandacowiehypnotherapy.com/wp-content/plugins/elementor/assets/js/frontend.min.js?ver=3.0.16”.

And when I look at the folder structure generated, there isnt even a plugins folder to include these.

TomLewis commented 3 years ago

So far I've added these plugin folders to my Git manually in their entirety as they all hold their assets inside the plugins folder.

/plugins/Elementor
/plugins/ocean-extra (Theme extras)
/plugins/premium-addons-for-elementor 

Yeah, you will need to add used plugin assets! This is 3 separate plugins that store assets (CSS/JS) in their plugin folder, and this is on a tiny scale project.

Form stopped working still, and its removed emails...

TomLewis commented 3 years ago

Alright, Im fully giving up with static hosting wordpress and just going back to normal hosting. a 10 min job turns into 11 hours with faffing around.

leonstafford commented 3 years ago

Hi @TomLewis, thanks for reporting and sorry for the frustration you've encountered!

I can suggest these Alternatives for when things aren't working out with one tool or another.

I'd love to say I've never had any 10 min jobs turn into 11 hour ones, but have worked on enough tech projects now, that it no longer suprises me :D WP2Static definitely has a long way to go for UX and error handling, though, so I'll keep this issue open to make sure it gets properly sorted out. It's unlikely to be this week, though.

TomLewis commented 3 years ago

I tried HTTrack as part of trying to figure out how to keep it all static, but it changed the URL structure, forcing /index.html on all URLs, where /contact/ would just be fine, it could have worked by manually editing but I just wanted a perminant solution that I didn't have to re set-up 8 months later when I come back to figure out new problem's. I did try this static hosting for the first time with this project as a test to see how much faffing around it needs. I ended up getting a VPS which took a lot of time to setup properly.

Not having the plugin on the wordpress website any more is super confusing, I had issues with it building from source on windows and then I found there's just links to it from another comment to download! Such a faff, that was a lost hour and a bit just trying to get the damn thing installed, also your website has no proper navigation, I highly suggest gitbook for some proper documentation website to organise visually having a decent menu and sub menus.

The web ui wouldn't start either, so I had to install and learn WP cli! I guess another tool under my belt but a learning curve of reading docs.

I think, better docs website, fixing the web ui starting without errors, something related to timeout I think, and using plugin assets so the page renders would be less stressful. I shouldn't have decided to learn this on a client's website haha, I've gone through a few iterations of the plugin now, it's like once every 8 months when the client wanted a change!

john-shaffer commented 3 years ago

When testing, I do see this problem with vanilla 7.1.6, but no problems with https://github.com/leonstafford/wp2static-addon-advanced-crawling enabled.

I can't figure out why the behavior is different, since the relevant detection logic is unchanged.

The crawling logic in the addon has been working fine for a while now, so maybe we can look at porting it back into the main plugin.

The main issue here is a dupe of https://github.com/leonstafford/wp2static/issues/730