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

Solving WordPress server error message in Add New theme screen #36

Open
javistuff opened this issue Nov 24, 2014 · 1 comment
Open

Solving WordPress server error message in Add New theme screen #36

javistuff opened this issue Nov 24, 2014 · 1 comment

Comments

@javistuff
Copy link

Hi there!

A quick heads up for something that was troubling our setup.

On the Add new theme screen, we were getting this error:

"An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums."

Seems like interfering the themes_api in this screen won't behave nicely. Mostly because not all arguments are present in the request. We've fixed it by adding this:

if ( !property_exists($args, 'slug') ) return false;

right before this line:

if ( $args->slug != $theme_base ) return false;

Just wanted to share it here, in case someone needs that too.
Thanks for this great library!

@ve3
Copy link

ve3 commented Nov 21, 2016

Hi,

I don't understand how themes_api filter works?
Is it working only in add new theme screen?

In this page (https://github.com/jeremyclark13/automatic-theme-plugin-update/blob/master/theme/update.php) said "Take over the Theme info screen on WP multisite".
But the theme info screen (like plugin screen modal dialog - as I understand) is just iframe and already got it via theme_update action.

And the add new theme screen don't have my custom theme in there because all of theme list here is on WordPress.org only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants