Output issue
-
Hello,
Publications are not displaying. Getting the following message instead:
“Could not retrieve publications. Please check the User ID or try again later.”
User ID is correct. What might the issue be?
David
-
Hello, may I know your Google Scholar link?
Thank youHi Valsze,
I added the shortcode [schopufe_publications user_id=”yOJFolEAAAAJ”] to a text block.
Regards,
David
Hi there. The user ID is valid and the plugin is working correctly.
It’s possible that the issue comes from the quotation marks in your shortcode.
If you copy–paste the shortcode, the quotes can sometimes change to “smart quotes” (“ ”), which are different characters.Please try typing the quotation marks (“) manually, that should fix it.

Hi Valsze,
Thank you. I tested both quote types, typing both manually, and both yielded the same result. I even tried using the unicode characters for the quotes and still no success.
Regards,
David
Hi David, thanks for the extra details and for testing the different quote types.
If you still see the same error, that means the shortcode itself is being parsed, but your site was not able to fetch or parse the Google Scholar page. The two most common causes are:
1. The server cannot reach scholar.google.com
Some hosts or security plugins block outgoing HTTP requests from WordPress ( wp_remote_get() ) to external domains such as https://scholar.google.com.2. The PHP DOM extension is missing
The plugin relies on DOMDocument (php-xml) to parse the HTML returned by Google Scholar.Could you please check the following and let me know?
- Your WordPress and PHP versions
You can find them under Tools → Site Health → Info. - Whether the DOM extension is enabled
In Tools → Site Health → Info → Server, check ifdom/php-xmlis listed as enabled.
If it’s missing, please ask your host to enable the PHP DOM / xml extension. - Any HTTP/connection issues
In Tools → Site Health → Status, see if there are warnings about “Loopback requests”, “Scheduled events”, or “HTTP requests”.
If you’re comfortable enabling debugging, you can also temporarily enable
WP_DEBUG_LOGinwp-config.php, reload the page with the shortcode, and then checkwp-content/debug.logfor any errors related to:scholar-publications-fetcherwp_remote_getDOMDocument
Hi Valsze,
Thank you. I checked. The first two are from a phpinfo file I uploaded to the server and the third from the WordPress Site Health > Status tab.
- PHP Version 7.4.33
- DOM/XML enabled
- Site can perform loopback requests
Scheduled events are running
HTTP requests seem to be working as expected
There was nothing suspicious in the debug log file that I could find. I also disabled all the plugins and got the same result.
David
Hi David,
Thank you very much for checking all of that and for the detailed feedback.
Your PHP version and DOM/XML setup look good, and the fact that other HTTP checks pass means the basics are working.Given that you’re still seeing:
“Could not retrieve publications. Please check the User ID or try again later.”
this means the shortcode is being parsed correctly, but WordPress is either:
- not receiving the expected HTML from Google Scholar, or
- receiving a different page (e.g. a block page or a profile that doesn’t list any publications).
To narrow this down, could you please:
- Run a small test to see what your server actually gets from Scholar
If you’re comfortable adding a temporary snippet (for example via the “Code Snippets” plugin or a small mu-plugin), please try something like:$url = 'https://scholar.google.com/citations?hl=en&user=yOJFolEAAAAJ&view_op=list_works&sortby=pubdate'; $response = wp_remote_get( $url ); if ( is_wp_error( $response ) ) { var_dump( $response->get_error_message() ); } else { echo 'HTTP status: ' . wp_remote_retrieve_response_code( $response ) . "<br>"; echo 'Body length: ' . strlen( wp_remote_retrieve_body( $response ) ); }If the status code is not 200, or the body length is very small, that usually means the host or a firewall is blocking requests toscholar.google.comspecifically.
Sometimes hosting providers allow general HTTP requests (so Site Health looks fine) but block requests to certain domains, including Google Scholar. If you can share:
- the HTTP status/body length from the snippet above (if you manage to run it),
I’ll be happy to investigate further and adjust the plugin if needed.
PS: I forgot this one. Just to completely rule out the quote issue, try to use the shortcode without the mark on a shortcode block:
[schopufe_publications user_id=yOJFolEAAAAJ count=10 order=desc](Attributes are allowed without quotes as long as they don’t contain spaces.)
Hi Valsze,
Thank you. Here is the result from the snippet you provided.
HTTP status: 403
Body length: 1103So, the server will not process the request.
Also, the shortcode without the quotes did not work.
David
Hi David,
Thank you for running that test – this is very helpful.
The result:
HTTP status: 403
Body length: 1103means that when your server tries to request your Google Scholar page, Google (or a firewall in between) is responding with 403 Forbidden. In other words, the plugin is working, but your server is not allowed to fetch the Scholar page, so there is nothing for the plugin to parse and display.
This also explains why:
- PHP 7.4 and DOM/XML are fine
- HTTP checks in Site Health “seem OK” (they usually test
api.wordpress.org, notscholar.google.com)
At this point, there are only two realistic options:
- Check with your hosting provider
Please contact your host and show them this information (HTTP 403 when callinghttps://scholar.google.com/citations?hl=en&user=yOJFolEAAAAJ&view_op=list_works&sortby=pubdate
from PHP / WordPress).
Ask if:- outbound HTTP/HTTPS requests to
scholar.google.comare being blocked or filtered, or - there is a security/WAF rule (e.g. mod_security, firewall, proxy) that is returning 403 for this domain.
scholar.google.comor relax the rule for your site, the plugin should start working immediately. - outbound HTTP/HTTPS requests to
- Use a different server/hosting (or a middle API)
If your host cannot or will not allow requests toscholar.google.com, then unfortunately this plugin cannot fetch your publications from that environment.
In that case, the only workaround would be to run the plugin on another WordPress installation where Scholar is accessible, and then embed the output (for example via iframe or a custom API), which is more advanced.
Because the HTTP 403 is coming from outside of WordPress, there’s sadly nothing I can change in the plugin itself to bypass it without breaking security guidelines.
Hi Valsze,
Thank you very much for your thorough analysis and suggestions. The host, SiteGround, is highly regarded, established and popular, so it would be odd if it did not allow requests from Google Scholar. I will contact SiteGround support about the issue and keep you posted.
Your support is outstanding. Can I suggest that you develop a similar sort of plug-in for PubMed? PubMed is a free online archive of biomedical and life science peer review journal literature. It is not as broad-based academically as Google Scholar, but it is more exhaustive. For example, Google Scholar for the user ID I used to test your plugin only lists half that user’s academic publications whereas PubMed has them all. There are a few PubMed WP plugins already, but they are all outdated and most have been abandoned and do not work anymore.
Regards,
David
Hi David,
Thank you so much for the detailed follow-up and for your kind words, I really appreciate it. Regarding your PubMed suggestion, I can’t promise. I have so many things happening in my private life. But I will consider it. Thanks again for your patience, testing, and thoughtful feedback, it really helps improve the plugin.
- Your WordPress and PHP versions
You must be logged in to reply to this topic.