elementor / wp2static-addon-s3

S3 deployment Add-on for WP2Static
The Unlicense
35 stars 23 forks source link

Addon not showing up in WP2Static Addons #37

Closed fabge closed 2 years ago

fabge commented 4 years ago

I build the addon via composer build and installed it. It can not be found by the WP2Static Plugin (which I installed the same way from the latest Github repository).

How do I register the addon with WP2Static?

leonstafford commented 4 years ago

Hi @fabge - could you try deactivating and re-activating the core plugin and see if that fixes it?

fabge commented 3 years ago

Same problem unfortunately...

fabge commented 3 years ago

Any way to fix this, I tried deactivating both in every order possible?

leonstafford commented 3 years ago

Hi @fabge sorry for delay.

I suggest manually deleting the DB tables for both plugins and then reinstalling. That should sort it out. Else, there should be an error logged somewhere.

fabge commented 3 years ago

After uninstalling the plugins, the DB tables are removed automatically. Don't really know what to do then...

leonstafford commented 3 years ago

I've not pushed it public yet, but last night, I added latest builds of all plugins to Lokl and all but the Netlify one were showing up in Add-ons screen. So, it seems to be OK from a clean state. Are you able to wipe that whole DB and start again or try in a separate, clean environment?

Sorry it's not a great answer, I'll dig into it more soon if still an issue

fabge commented 3 years ago

I tried it with a fresh wordpress installation, no sucess.

I might have done something wrong when using composer to build the .zips. I used the latest Github repos and composer build xxxx to build it. One weird thing: wp2static.zip is 346 KB whereas wp2static-s3.zip is 2.7MB.

leonstafford commented 3 years ago

@fabge - could you please let me know a bit more about your environment - OS, PHP version, as much as you can.

WP2Static core is intended to be as small as possible. S3 one contains the whole Amazon PHP SDK, which makes it quite massive. At one point, I used a very minimal custom S3 + CloudFront code, but that was not as reliable. I also had some PHP compression in the S3 add-on (and several others) until just last night, I believe. This reduced the size down, but made it harder for a user to debug something if it went wrong.

On many WordPress setups, 2MB has long been the default max upload size, making it a goal to keep it under that. I decided it's OK to go over for S3, as if anyone hits that error, they'll already have committed a bit more by installing the core plugin without issue and compared to say Netlify or GitHub Pages, those wanting to use S3 tend to be used to a bit more technical pain, so will likely reach out or debug if they hit that 2MB limit when uploading the add-on to such a server.

If you can check your server's error logs (for PHP and/or the webserver), they may yield some hints as to what's causing this issue on your environment.

fabge commented 3 years ago

Thank you for that detailed explanation!

I have now turned on turned on WP_DEBUG. After installing and activating, there seems to be a problem with the addon table. Following error is thrown when visiting the Addons subpage:

WordPress database error: [Table 'fabiange_wp225.wpxh_wp2static_addons' doesn't exist]
SELECT * FROM wpxh_wp2static_addons ORDER BY type DESC

I am using PHP 7.3.22 and run it on a shared hosting environment.

fabge commented 3 years ago

The WP2Static logs also show that it failed to create some other name indexes:

image

fabge commented 3 years ago

Any hints on what could be the issue @leonstafford ?

leonstafford commented 3 years ago

Hi @fabge sorry for such a long delay in getting back to you!

I've just built a fresh version of this and it's running OK within my https://lokl.dev environment, so we can see exactly what software versions are being used within that:

In general, these add-ons need some more work to self-check on activation/enabling to ensure everything's in order.

In this case, due to those other MySQL errors in the WP2Static log, it seems a MySQL version/configuration incompatibility. Besides PHP and WordPress versions, I haven't got much idea of minimum MySQL requirements today, sorry.

If you can try fresh on a new host, such as some local WordPress environment, that's a free alternative for now..

greenk commented 3 years ago

Hello @leonstafford I have enabled both WP2static and Wp2-static-s3-addon on my local server

PHP 7.3.4 Mysql 5.7.26 WP 5.5.4

I have checked and in the WP2static Addon screen it says my wp2-static-s3-addon 'enabled'. However, when I try to deploy it whether through WP2Static UI or WP2static command line, it keeps giving me 'No deployment add-ons are enabled, skipping deployment'.

Could you give me a hint of what should I follow to debug this error?

Thank you very much.

leonstafford commented 3 years ago

Hi @greenk,

There are some newer builds published over the last week, also tagged as releases here in github. To get them from WP2Static.com, you can go here: https://wp2static.com/thanks-for-donating

And ensure the 1.0 version of the S3 addon and 7.1.6 of WP2Static core plugin.

If that's still failing, can you please post your export log here

greenk commented 3 years ago

Thank you @leonstafford for quick reply. It is working for me. both Wp2static and Wp2static-s3-addon

antwal commented 3 years ago

hi all,

i have same problem, on Wordpress Multi Sites installation

on root site - s3 plugin not is active, but on wp2static addons menu i see it like active on sub site - s3 plugin is active but on wp2static addons menu i see it not active and not visible

same problem with the other addons

john-shaffer commented 3 years ago

This should be fixed by https://github.com/leonstafford/wp2static/pull/742

antwal commented 3 years ago

This should be fixed by leonstafford/wp2static#742

i tried the patches, it works, now it displays correctly

only problem on the mutlites after some tests;

if it is deactivated by one of the sub-sites this continues to remain visible even if when you log in it says that you do not have the permissions

on the main site the plugin is always active even if it is not

leonstafford commented 3 years ago

Latest builds including these fixes (but not yet published as releases)

wp2static-addon-s3-2021MAY27.zip

wp2static-2021MAY27.zip

john-shaffer commented 2 years ago

Fixed in WP2Static 7.1.6.

DougBeney commented 2 years ago

I just downloaded the latest version - wp2static 7.1.7.

There is still one quirk that is not fixed for multisites.

If you install the plugin and addons...then network activate for ALL sites on your network, the wp2static addons list will be fine on your primary multisite but for all others it will be blank.

The temporary fix is no network deactivate the plugins and then on each individual website's dashboard, enable the plugins.