Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author valsze

    (@valsze)

    Glad to hear that!

    I’ve just released an update for the plugin with PHP 8.5 compatibility. I also added a dedicated admin settings panel, so it should now be easier to configure the plugin without manually editing shortcode attributes.

    Please feel free to try the latest version and let me know if you run into any issues.

    Plugin Author valsze

    (@valsze)

    Hello. I’m sorry for your problem. I’m still on a vacation. But honestly, I haven’t tried my code with PHP 8.5. Try to lower your version to 8.3 first and get back to me. Sorry, the internet receptions are really bad here.

    Regards,

    Val

    • This reply was modified 1 month, 1 week ago by valsze. Reason: Typo
    Thread Starter valsze

    (@valsze)

    Solved by installing mini plugin. Thank you

    Plugin Author valsze

    (@valsze)

    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.

    Plugin Author valsze

    (@valsze)

    Hi David,

    Thank you for running that test – this is very helpful.

    The result:

    HTTP status: 403
    Body length: 1103

    means 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.ww.wp.xz.cn, not scholar.google.com)

    At this point, there are only two realistic options:

    1. Check with your hosting provider
      Please contact your host and show them this information (HTTP 403 when calling
      https://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.com are being blocked or filtered, or
      • there is a security/WAF rule (e.g. mod_security, firewall, proxy) that is returning 403 for this domain.
      If they can whitelist scholar.google.com or relax the rule for your site, the plugin should start working immediately.
    2. Use a different server/hosting (or a middle API)
      If your host cannot or will not allow requests to scholar.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.

    Plugin Author valsze

    (@valsze)

    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:

    1. not receiving the expected HTML from Google Scholar, or
    2. 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:

    1. 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 to scholar.google.com specifically.

    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.)

    • This reply was modified 6 months, 2 weeks ago by valsze. Reason: I forgot something
    • This reply was modified 6 months, 2 weeks ago by valsze. Reason: typo
    Plugin Author valsze

    (@valsze)

    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?

    1. Your WordPress and PHP versions
      You can find them under Tools → Site Health → Info.
    2. Whether the DOM extension is enabled
      In Tools → Site Health → Info → Server, check if dom / php-xml is listed as enabled.
      If it’s missing, please ask your host to enable the PHP DOM / xml extension.
    3. 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_LOG in wp-config.php, reload the page with the shortcode, and then check wp-content/debug.log for any errors related to:

    • scholar-publications-fetcher
    • wp_remote_get
    • DOMDocument
    Plugin Author valsze

    (@valsze)

    You’re welcome 🙂

    Plugin Author valsze

    (@valsze)

    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.

    Plugin Author valsze

    (@valsze)

    Hello, may I know your Google Scholar link?
    Thank you

    Plugin Author valsze

    (@valsze)

    Hi there!
    The plugin has been updated with a new parameter, you can now control the display order of your publications.

    To show your oldest publications first, add the order="asc" attribute to your shortcode.

    For example:

    [schopufe_publications user_id="YOUR_ID" order="asc" count="10"]

    This will display the first 10 oldest publications from your Google Scholar profile.

    • This reply was modified 6 months, 2 weeks ago by valsze. Reason: typo
Viewing 11 replies - 1 through 11 (of 11 total)