• phxfreddy

    (@phxfreddy)


    Please note during debugging I may or may not have wpmathpub enabled or not.

    Using WordPress version = 6.8.2 wpmathpub version = 2.0.4

    While I have wpmathpub enabled I found that when I go to baseURL/page/263 there would be no pagination numbers at the bottom of the page. Thus I coerced things by modifying the URL = baseURL/page/264. When I hit enter a blank page was returned and the error below was served. I then entered URL = baseURL/page/265 and it served a regular page up.

    The error returned from entering / hitting return on URL = baseURL/page/264 was

    : Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in
    /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/phpmathpublisher/mathpublisher.php:1050
    Stack trace: 0 /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/phpmathpublisher/mathpublisher.php(1005): expression_math->dessine_expression(9.6) 1 /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/phpmathpublisher/mathpublisher.php(1232): expression_math->dessine(9.6) 2 /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/phpmathpublisher/mathpublisher.php(967): expression_math->dessine_grandoperateur(’12’, ‘_integrale’) 3 /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/phpmathpublisher/mathpublisher.php(1020): expression_math->dessine(’12’) 4 /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/phpmathpublisher/mathpublisher.php(1005): expression_math->dessine_expression(’12’) 5 /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/phpmathpublisher/mathpublisher.php(1673): expression_math->dessine(’12’) 6 /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/phpmathpublisher/mathpublisher.php(1704): mathimage(‘int{}{}{E circ …’, ’12’, ‘https://www.ama…’) 7 /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/wpmathpub.php(118): mathfilter(‘ int{}{}{E c…’, ’12’, ‘https://www.ama…’) 8 [internal function]: wpmathfilter(Array) 9 /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/wpmathpub.php(132): preg_replace_callback(‘#\[pmath(\s+siz…’, ‘wpmathfilter’, ‘

    \r\n\t\xC3\xA2\xE2\x82\xAC\xE2\x80\xB9<…’) 10 /home/politico/amarketplaceofideas.com/wp-includes/class-wp-hook.php(324): to_phpmath(‘

    \r\n\t\xC3\xA2\xE2\x82\xAC\xE2\x80\xB9<…’) 11 /home/politico/amarketplaceofideas.com/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘

    \r\n\t\xC3\xA2\xE2\x82\xAC\xE2\x80\xB9<…’, Array) 12 /home/politico/amarketplaceofideas.com/wp-content/themes/default/inc/views/blog/class-hestia-blog-post-layout.php(281): apply_filters(‘the_content’, ‘

    \r\n\t\xC3\xA2\xE2\x82\xAC\xE2\x80\xB9<…’) 13 /home/politico/amarketplaceofideas.com/wp-content/themes/default/inc/views/blog/class-hestia-blog-post-layout.php(249): Hestia_Blog_Post_Layout->get_post_content() 14 /home/politico/amarketplaceofideas.com/wp-content/themes/default/inc/views/blog/class-hestia-blog-post-layout.php(220): Hestia_Blog_Post_Layout->get_theme_excerpt(‘default’) 15 /home/politico/amarketplaceofideas.com/wp-content/themes/default/inc/views/blog/class-hestia-blog-post-layout.php(66): Hestia_Blog_Post_Layout->render_post_body() 16 /home/politico/amarketplaceofideas.com/wp-content/themes/default/inc/views/blog/class-hestia-blog-post-layout.php(44): Hestia_Blog_Post_Layout->get_article(Array) 17 /home/politico/amarketplaceofideas.com/wp-includes/class-wp-hook.php(324): Hestia_Blog_Post_Layout->render(‘default’) 18 /home/politico/amarketplaceofideas.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 19 /home/politico/amarketplaceofideas.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 20 /home/politico/amarketplaceofideas.com/wp-content/themes/default/template-parts/content.php(12): do_action(‘hestia_blog_pos…’, ‘default’) 21 /home/politico/amarketplaceofideas.com/wp-includes/template.php(812): require(‘/home/politico/…’) 22 /home/politico/amarketplaceofideas.com/wp-includes/template.php(745): load_template(‘/home/politico/…’, false, Array) 23 /home/politico/amarketplaceofideas.com/wp-includes/general-template.php(206): locate_template(Array, true, false, Array) 24 /home/politico/amarketplaceofideas.com/wp-content/themes/default/index.php(66): get_template_part(‘template-parts/…’) 25 /home/politico/amarketplaceofideas.com/wp-includes/template-loader.php(106): include(‘/home/politico/…’) 26 /home/politico/amarketplaceofideas.com/wp-blog-header.php(19): require_once(‘/home/politico/…’) 27 /home/politico/amarketplaceofideas.com/index.php(17): require(‘/home/politico/…’) 28 {main} thrown in /home/politico/amarketplaceofideas.com/wp-content/plugins/wpmathpub/phpmathpublisher/mathpublisher.php on line 1050

    The page I need help with: [log in to see the link]

Viewing 13 replies - 31 through 43 (of 43 total)
  • Plugin Author Ron Fredericks

    (@ronf)

    I figured out a test case that creates the dreaded error on line 1055. And implemented a solution both in phpmathpublisher as reported by your [and mine] error_log. The fix catches the error and silently skips the equation all together. Then from my test case, I implemented a test within my own wpmathpub code so the error never gets to phpmathpub along with a “friendly” error message within the blog post itself where the pmath tag is located. Then, once the error was removed, I found a smaller error that does not crash the plugin but reports a one line every time it is called. I fixed that too.

    Now you can see my live test case in action on the last private test page on my site:

    November 25, 2025Protected: wpmathpub tech support review 2025_11_25_b

    Filed under: Electronic Components — Tags: wpmathpub — Ron Fredericks @ 6:09 pm Edit This

    Try to break wpmathpub

    Dollar test $0.00

    Blank tag now handled by an empty shortcode error message Error: wpmathpub plugin shortcode cannot be empty

    Tag with HTML entities test html://www.embeddedcomponents.com

    The code in html editor that generates the test case above looks like this:

    Try to break wpmathpub

    Dollar test [pmath]$0.00[/pmath]

    Blank tag now handled by an empty shortcode error message [pmath][/pmath]

    Tag with HTML entities test [pmath size=24]html://www.embeddedcomponents.com[/pmath]

    Next, in a few hours, I will email you a zip file with a repaired wpmathpub plugin. If you can, install the emailed zip file and see if your error [an unknown test case] goes away.

    Thread Starter phxfreddy

    (@phxfreddy)

    I will give it a whirl as soon after it shows up.

    Note: when i was yammering about $ symbol being used in a WP post I was talking about the unrelated problem of the following:

    Random jibber jabber for $5

    If I put that phrase in bold above in a WP entry then save it off and take a look the entry – it will be all discombobulated. This always happens. It’s not part time. It is full time.

    I did not mean to distract with that. It was mentioned in context of wpmathpub only in the sense that for a little bit I thought maybe I had a strange combination of characters that was breaking wpmathpub. I suppose maybe that is the case but only in the sense that it’s feeding a null string to something important in wpmathpub in fairly rare instances.

    • This reply was modified 2 months, 1 week ago by phxfreddy.
    • This reply was modified 2 months, 1 week ago by phxfreddy.
    • This reply was modified 2 months, 1 week ago by phxfreddy.
    • This reply was modified 2 months, 1 week ago by phxfreddy.
    • This reply was modified 2 months, 1 week ago by phxfreddy.
    Plugin Author Ron Fredericks

    (@ronf)

    Just cjecking in… Did you get the zip file vi email yesterday?

    I am posting the zip file for download from my website in case you did not.

    Plugin Author Ron Fredericks

    (@ronf)

    Thread Starter phxfreddy

    (@phxfreddy)

    Thanks for the gig. I had not seen. I only knew to check google > spam folder after you inquired. Working it now.

    Guess they no likey zip zip.

    • This reply was modified 2 months, 1 week ago by phxfreddy.
    Thread Starter phxfreddy

    (@phxfreddy)

    Uploaded beta version wpmathpub and activated. Is working good.

    Thread Starter phxfreddy

    (@phxfreddy)

    I did notice one thing. When I activate wpmathpub I get the following error message:

    Deprecated: Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead. in /home/politico/amarketplaceofideas.com/wp-includes/functions.php on line 6131

    Next I disabled all plugins. Then enabled ONLY wpmathpub. Still came back with a double flagging of the following error

    Deprecated: Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead. in /home/politico/amarketplaceofideas.com/wp-includes/functions.php on line 6131

    Still using a different theme than you. Is that the only thing that could be different between my setup and yours if I disable all other plugins?

    • This reply was modified 2 months, 1 week ago by phxfreddy.
    • This reply was modified 2 months, 1 week ago by phxfreddy.
    • This reply was modified 2 months, 1 week ago by phxfreddy.
    Thread Starter phxfreddy

    (@phxfreddy)

    Curious what sort of tools you use to do this work?

    Plugin Author Ron Fredericks

    (@ronf)

    I use thse two files to debug / develop my plugin. Download the plugin to your PC then find the two php files in my code (root and phpmathpublisher directories):

    Bonus: Link to creating and using the simplest wordpress plugin at 2:27 in this short video: https://www.youtube.com/watch?v=MW-evyl4nQU&t=222s

    You are a great software testing superstar! I don’t see any errors in my error_log but I did find this call that ultimately could generate an error via on_cap in functions.php:

    // action function for above hook
    function mt_add_pages() {
    // Add a new submenu under Manage:
    // add_management_page('WPMathPub', 'WPMathPub', 8, 'wpmathpubmanage', 'wpmathpub_manage_page');
    add_management_page('WPMathPub', 'WPMathPub', 'manage_options', 'wpmathpubmanage', 'wpmathpub_manage_page');
    }

    Here is a link to download a new beta (same as old link):

    https://www.biophysicslab.com/download/wpmathpub-wordpress-plugin-latest-beta

    Thread Starter phxfreddy

    (@phxfreddy)

    Testing done:

    • Condition: all plugins activated including wpmathpub: No errors flagged due to null string issue
    • Condition: all plugins activated and toggling state of wpmathpub: No errors flagged when enabling / disabling wpmathpub plugin.

    I asked about your tool set because years ago I wrote a classified ad website in PERL from near scratch. I used a text editor with FileZilla to upload every time I need to run the code to my dreamhost account. It was on a Windows box. Switched out of Windows 2 year ago because of all the odd stuff MS is getting up to w/ Windows 11. Things are so much more natural on Linux for this kind of stuff.

    Am thinking to set up on a box with host file set to refer to local computer so I do not have to cycle through uploading. That got pretty maddening. Not as in angry mad. As in crazy loony bin mad.

    I will let you know if I find anything else with usage. Keep my contact info. If you have anything you need help testing I am up for it.

    Plugin Author Ron Fredericks

    (@ronf)

    great.
    You can use Broadcom Fusion VM to set up a Linux virtual machine on your PC for free. Setup WordPress on it and share code between pc or develop on the Linux box itself and work with the web server files directly. Fusion is free great support and rock solid.

    I will stay in touch and you are welcome to contact me as well on “stuff”

    Plugin Author Ron Fredericks

    (@ronf)

    Hi phxfreddy

    After all of our joint work testing WPMathPub – I posted the official version 2.1.4 on the wordpress website just now. You can find the public page here:

    https://wordpress.org/plugins/wpmathpub/

    Your site won’t show that there is a new version available (same for me) because my “beta” test version we both used, has the same version: 2.1.4

    So to get the official released new version (with a few more small changes) you will need to go to “add new plugin”, find WPMathPub, then install it. The new install will overwrite the beta version.

    Sorry about that – lesson learned – beta release versions need their own (earlier) version number in readme.txt and in WPMathPub.php – otherwise my best users (beta testers) won’t know to get the new release.

    Thread Starter phxfreddy

    (@phxfreddy)

    No worries. Is good to have everything enabled again so I can have it render the math images.

Viewing 13 replies - 31 through 43 (of 43 total)

You must be logged in to reply to this topic.