Support » Fixing WordPress » Not able to search for new themes

  • I have performed a fresh install of WP

    Everything is working accept I can’t search for themes but I can search for plugins.

    When I search for themes I get the following error message

    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.

    Try again

    I do not think this is a connectivity issue as I can download plugins etc

Viewing 15 replies - 1 through 15 (of 20 total)
  • Moderator t-p

    (@t-p)

    WP free theme repository: http://wordpress.org/themes/

    Thanks for the reply. I’m reporting an issue with my wp configuration or permissions.

    I am trying to use the search theme and install tool buil into wordpress.

    When I click the search button I get the following error message after a time out period.

    “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.”

    ownership of the files is set to the Apache user
    I set for the purposes of testing my root http directory to 777 recursively
    Selinux in not enabled

    Has anyone sean and fixed this issue before?

    I got debug working and get the following error message when I search for themes using the search key at /wp-admin/network/theme-install.php

    but I don’t think this is related to my issue

    [14-Oct-2013 22:59:52] PHP Notice: wpdb::escape is deprecated since version 3.6! Use wpdb::prepare() or esc_sql() instead. in /var/www/html/wp-includes/functions.php on line 2905

    Moderator t-p

    (@t-p)

    – To rule out any theme-specific issue, try switching to the unedited default theme for a moment using the WP dashboard. If you don’t have access to your admin area, you can switch to the default theme by renaming your current theme’s folder in wp-content/themes and adding “-old” to the end of the folder name using via FTP or SFTP or whatever file management application your host provides. Alternately, you can remove other themes except the default theme. That will force your site to use it.

    Thanks for the tip.

    As it happens I was already using the default twenty thirteen theme but did have many others installed
    I have deleted the others no change I still cant search for new themes

    Further information about my installation
    I am hosting this myself on a centos 6 server
    WP is installed as a multisite installation
    I can search for plugins and install them

    My browser looks like it is timing out waiting for an answer somewhere. Are there any logs I can view to find out where the search page is trying to pull information from so I can check access

    Moderator t-p

    (@t-p)

    If your server does not allow automatic installation of themes, try installing themes manually.

    Useful codex: http://codex.wordpress.org/Using_Themes

    Many thanks for the advice however I see no reason why the search tool shouldn’t work.

    Installing manualy is a workaround.

    I have full access to the server and rebuild as many thimes as it takes to obtain a fully working installation of wordpress.

    Somthing is blocking access.

    Thanks

    esmi

    (@esmi)

    Forum Moderator

    If blocking is happening, it’s at your server’s end rather than at wordpress.org. For example this is sometimes caused by a failure to compile PHP with cUrl on your server.

    This sounds more like the issue.
    is there a log I can see blocking occour?

    I install my servers via RPM. Could it be there is a package dependencie missing?

    Which cUrl and PHP packages do I need?

    Thanks

    esmi

    (@esmi)

    Forum Moderator

    is there a log I can see blocking occour?

    That log would be on your server – not here.

    Could it be there is a package dependencie missing?

    Quite possibly.

    Which cUrl and PHP packages do I need?

    Ok – now you’ve got me! I’ve not set up a server using Red Hat’s package manager. As I’m only using my own server locally, I’ve wimped out and used a WAMP type bundled install. I’ll ask around and see if I can get someone with the requisite experience to chime in on this.

    Interesting, you’re the second person I’ve seen post that they can search plugins but not themes via WordPress admin. In the other poster’s case, he just contacted his host (I think they had to whitelist a URL).

    What happens when you do this:

    curl -I http://api.wordpress.org/plugins/info/1.0/

    and

    curl -I http://api.wordpress.org/themes/info/1.0/

    That will at least tell you if you have cURL installed and if you can make the connection to the repspecitve APIs (though you’ve already said you can search plugins). If you can, you should see output something like this:

    HTTP/1.1 200 OK
    Server: nginx
    Date: Tue, 15 Oct 2013 14:06:36 GMT
    Content-Type: text/html; charset=utf-8
    Connection: close
    Vary: Accept-Encoding

    So it doesn’t look like a connectivity issue then

    [root@web01 ~]# curl -I http://api.wordpress.org/plugins/info/1.0/
    HTTP/1.1 200 OK
    Server: nginx
    Date: Tue, 15 Oct 2013 17:49:59 GMT
    Content-Type: text/html; charset=utf-8
    Connection: close
    Vary: Accept-Encoding

    [root@web01 ~]# curl -I http://api.wordpress.org/themes/info/1.0/
    HTTP/1.1 200 OK
    Server: nginx
    Date: Tue, 15 Oct 2013 17:50:32 GMT
    Content-Type: text/html; charset=utf-8
    Connection: close
    Vary: Accept-Encoding

    Back to looking at permissions and config

    cURL isn’t the only transport used (curl, streams, and fsockopen), but WordPress will look for curl first.

    So, one more cURL attempt. Actually query the API instead of just calling the HEAD:

    Themes – search for ‘blue’

    curl --data 'action=query_themes&request=O:8:"stdClass":4:{s:4:"page";i:1;s:8:"per_page";i:36;s:6:"fields";N;s:6:"search";s:4:"blue";}' http://api.wordpress.org/themes/info/1.0/

    Plugins – search for ‘cache’

    curl --data 'action=query_plugins&request=O:8:"stdClass":3:{s:4:"page";i:1;s:8:"per_page";i:30;s:6:"search";s:5:"cache";}' http://api.wordpress.org/plugins/info/1.0/

    In both cases you should get a load of serialized data back.

    Yes. get lots of data coming back on both commands

    O:8:”stdClass”:2:{s:4:”info”;a:3:{s:4:”page”;i:1;s:5:”pages”;i:2;s:7:”results”;i:45;}s:6:”themes”;a:36:{i:0;O:8:”stdClass”:10:{s:4:”name”;s:9:”Catch Box”;s:4:”slug”;s:9:”catch-box”;s:7:”version”;s:5:”2.8.1″;s:6:”author”;s:11:”catchthemes”;s:11:”preview_url”;s:30:”http://wp-themes.com/catch-box”;s:14:”screenshot_url”;s:63:”http://wp-themes.com/wp-content/themes/catch-box/screenshot.png”;s:6:”rating”;d:90.7999999999999971578290569595992565155029296875;s:11:”num_ratings”;i:52;s:8:”homepage”;s:37:”http://wordpress.org/themes/catch-box”;s:11:”description”;s:1166:”Catch Box is simple, lightweight, box shaped, and adaptable WordPress Theme for bloggers and professionals. It is based on HTML5, CSS3 and Responsive Web Design to view in various devices. 10 Best Reasons to use Catch Box Theme.

    It must be permissions of some sort

    At this point, if it were me, I’d have to debug from within WordPress core to see what’s coming back from the request in WordPress itself. For instance, if I var_dump $request in wp-admin/includes/theme.php and turn of wifi (I’m on my laptop), I get:

    /common-controller.php on line 315
    object(WP_Error)#258 (2) { ["errors"]=> array(1) { ["http_request_failed"]=> array(1) { [0]=> string(87) "Could not resolve host: api.wordpress.org; nodename nor servname provided, or not known" } } ["error_data"]=> array(0) { } }

    That said, you shouldn’t have to do this, (and you probably shouldn’t), I’d say it has to be a server issue.

    There are a lot of reasons the request could fail, but to see the error message:

    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.

    I think that only happens if the request failed or the data that came back was bad (or empty).

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Not able to search for new themes’ is closed to new replies.