• sdcr

    (@solidcolour)


    It was working fine on WordPress v4.9.2 I remember. But stop working correctly on v4.9.4. It only displays 3 articles on the list, and not the most recent ones either. Any way to fix?

    • This topic was modified 6 years, 9 months ago by sdcr.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author jimhu

    (@jimhu)

    Thanks for the report. Looks like I will have to debug on my end. I’ll try to push a new version asap.

    Plugin Author jimhu

    (@jimhu)

    Something odd happened to my site this AM. Yesterday the references were gone on this post: https://jimhu.org/wp-pubmed-reflist/

    So I worked on a new version last night. The new version switches the query to use https, which I think is what NIH prefers, and detects whether the user’s php has the needed php modules for openSSL and SimpleXML (which is what parses the results). But this AM, before I could push the new version, the references were back on that page, which is still using the last version.

    Did yours come back? The plugin caches the reference list and refreshes it if it’s more than a day old. My guess is that the cache expired and then the reflist was rebuilt.

    Thread Starter sdcr

    (@solidcolour)

    Thanks for the reply. It is working now, very strange!

    A few other points that should be fixed in my opinion:

    <a href=https://www.ncbi.nlm.nih.gov/pubmed?term=XXX>Search PubMed</a>
    Missing quotes href="..."

    Warning: array_key_exists() expects parameter 2 to be array, null given in /.../wp-content/plugins/wp-pubmed-reflist/class.wpPubMedRefList.php on line 178

    Errors if you set define( 'WP_DEBUG', true );

    Do you have the plugin that also work with static html, not in WordPress?

    • This reply was modified 6 years, 9 months ago by sdcr.
    Plugin Author jimhu

    (@jimhu)

    Thanks for the suggestions. I just pushed a new version.

    I may have squashed most of the WP_DEBUG errors, I hope. But there’s a mysterious one I sometimes get related to register_sidebar that I can’t figure out, since I never call that function.

    Thread Starter sdcr

    (@solidcolour)

    That’s great! no more errors. I guess the register_sidebar may complain about your functions.php, not related to the plugin.

    Very often I develop static html sites, do you have any suggestions to make it work without WordPress? Is there a JavaScript powered version?

    • This reply was modified 6 years, 9 months ago by sdcr.
    Plugin Author jimhu

    (@jimhu)

    I don’t have a javascript powered version. Might be interesting to try to translate it to jQuery or some other js framework… but my js is even weaker than my PHP.

    The funny thing is that the basic functionality started as something I wrote for our static HTML+PHP website years ago. I adapted it for Mediawiki for some other projects, and then when my department switched to WordPress I made this plugin and decided to make it publicly available … mostly so friends in other departments and at other schools could try it.

    I think if you look at the class.PMIDeFetch.php file and the class.wePubmedReflist file, you’d have 99% of what is needed to use on a non-WP site. The other stuff is largely to use the WP options system to store things in the database and the WP admin panel to manage it. Back when I did this with he homebuilt systems, I just had include files that defined the queries as an array and I cached the outputs in the filesystem. I just did the management in a text editor.

    But that meant any changes had to be done by me, and I became rate-limiting.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Not display most recent and correct number of list’ is closed to new replies.