Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin is not giving any updates #1

Closed
simplyaakif opened this issue Sep 23, 2018 · 6 comments
Closed

Plugin is not giving any updates #1

simplyaakif opened this issue Sep 23, 2018 · 6 comments
Assignees
Labels
question Further information is requested wontfix This will not be worked on

Comments

@simplyaakif
Copy link

Hi there,
I am heaving an issue in executing the plugin functionality. I am unable to set it to work for some reason.

I have copied the necessary lib folder in my themes root folder. Also as instructed i haved edited the functions.php with necessary code.
Further more i have uploaded the package and reads the version correctly but i am still not getting update notification on my other web setups whom are using this theme.

Now I would like to ask is it because.. I am using a sub-domain or have i misunderstood theme prefix. Currently my theme folder name is zb_restate

$zb_restate= new WP_Package_Updater(
'http://one.ace.org.pk/', ///////////////////////////////////
wp_normalize_path( FILE ),
get_stylesheet_directory(),
false // Can be omitted, false by default
);

Kindly let me know if i have implemented it wrongly in any manner or se.

@froger-me
Copy link
Owner

froger-me commented Sep 23, 2018

Hello,

Aside from the strange amount of / in the snippet :p, there doesn't seem to be any issue.

Please let me know the package id of the theme or the name of the package (I assume it's zb_restate or zb_restate.zip), the current version installed, and the version to update to. When trying to get the package's metadata at http://one.ace.org.pk/wppus-update-api/?action=get_metadata&package_id=zb_restate&update_type=Theme, the response came back empty.

On a side note, it is highly recommended to use https on the WordPress install where WP Plugin Update Server is installed - I actually plan to enforce it in the next version.

@froger-me
Copy link
Owner

froger-me commented Sep 23, 2018

Also, after investigating the update API endpoint at http://one.ace.org.pk/wppus-update-api/action=get_metadata&package_id=zb_restate, it seems there is either an error triggered in the background or a conflict with another plugin preventing it from being reached: indeed, the blank page has a status 200 (if the package ID was wrong, it would be 500 ; if the action was wrong, it would be 400).
With a status 200, the endpoint is supposed to return an application/json response. However, when testing, I receive a text/html response.

To investigate more, I would recommend to (in order, and on the server, not the client):

  • visit the permalinks admin page to ensure the endpoint is set and test again
  • try again and check the error logs
  • add define('WP_DEBUG', true); to wp-config.php and try again, and check the error logs
  • deactivate a maximum amount of plugins and test again (the mu-plugin should prevent them from executing, but we never know)
  • switching to a default theme and test again (the mu-plugin should prevent your theme's function.php from executing, but we never know)

If nothing does the trick, I would be happy to debug for you, provided I have SSH access (and I know it's not a small thing to ask, so it's last resort).

@froger-me
Copy link
Owner

froger-me commented Sep 23, 2018

To facilitate troubleshooting, I have changed how the update API endpoint is handling its parameters. Please update WP Plugin Update Server to v1.4.2 - no call to http://one.ace.org.pk/wppus-update-api should result in a blank page, no matters the parameters passed (either a 400 or 404 error should show in case of issue).

@froger-me froger-me added the question Further information is requested label Sep 23, 2018
@froger-me froger-me self-assigned this Sep 23, 2018
@simplyaakif
Copy link
Author

First of all, I would like to say that I really appreciate you answering this with light speeds. 👍
I have not seen many people do that. To post not one but multiple answers to solve the issue.

Apparently, with your help, it is running as its supposed to in terms of JSON response.

I followed your advice regarding plugin confliction and so on. Turns out it was a stupid permalink issue which was turned to the plain by multiple migrations. So bad on my end.

One last thing is that using the endpoint
http://one.ace.org.pk/wppus-update-api/?action=get_metadata&package_id=zb_restate&update_type=Theme
I get the Jason and can download from the link.

Now I tried to update it and got this
An error occurred while updating AR RealEstate: Download failed. Service Unavailable

My question is because I am trying to update it on the same site, it's being hosted or something similar.

Once again I would like to offer my gratitude to you for making such an awesome plugin. I will really do my best in spreading the word of this great plugin.

@froger-me
Copy link
Owner

Hey @simplyaakif !
Thanks for the kind words, and glad to see it's going in the right direction!

If I do understand well, you client and your server are on the same installation. If that's the case, it is normal the service is unavailable: when WordPress updates plugins, it puts locks in place preventing the server from doing its job, and it gets a 503 response.

To actually test, you could simply have the server run on a subdomain:

I hope this helps!

@froger-me froger-me added the wontfix This will not be worked on label Dec 4, 2018
@froger-me
Copy link
Owner

No follow up in 2 months - closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants