• Resolved Ron Phillips

    (@netizenron)


    Hi All,

    I’ve no idea what the issue is, obviously since I’m posting.

    WC Admin dashboard panels are not rendering. Not all of them, but the main dashboard as well as customers, reports, analytics. Products and Orders seem to be working. The dashboards that are broken throw no php errors, but the console does throw an error related to JSON and the react-dom.min.js file.

    SyntaxError: Unexpected number in JSON at position 5
        at JSON.parse (<anonymous>)
        at index.min.js?ver=2.1.2:2
        at lodash.min.js?ver=4.17.19:97
        at lodash.min.js?ver=4.17.19:53
        at ee (lodash.min.js?ver=4.17.19:34)
        at qc (lodash.min.js?ver=4.17.19:97)
        at Ur (index.min.js?ver=2.1.2:2)
        at Cr (index.min.js?ver=2.1.2:2)
        at _t (index.min.js?ver=2.1.2:2)
        at we (react-dom.min.js?ver=16.13.1:84)
    Me	@	react-dom.min.js?ver=16.13.1:125
    Ih.c.callback	@	react-dom.min.js?ver=16.13.1:138
    Wg	@	react-dom.min.js?ver=16.13.1:67
    oj	@	react-dom.min.js?ver=16.13.1:127
    Aj	@	react-dom.min.js?ver=16.13.1:160
    unstable_runWithPriority	@	react.min.js?ver=16.13.1:25
    Da	@	react-dom.min.js?ver=16.13.1:60
    ab	@	react-dom.min.js?ver=16.13.1:154
    Te	@	react-dom.min.js?ver=16.13.1:146
    Ja	@	react-dom.min.js?ver=16.13.1:224
    md	@	react-dom.min.js?ver=16.13.1:173
    (anonymous)	@	react-dom.min.js?ver=16.13.1:175
    Rh	@	react-dom.min.js?ver=16.13.1:147
    nd	@	react-dom.min.js?ver=16.13.1:175
    I.render	@	react-dom.min.js?ver=16.13.1:238
    (anonymous)	@	index.min.js?ver=2.1.2:2
    294	@	index.min.js?ver=2.1.2:2
    a	@	index.min.js?ver=2.1.2:2
    wc.app.0	@	index.min.js?ver=2.1.2:2
    (anonymous)	@	index.min.js?ver=2.1.2:2

    It is currently using all current installations of WP and WC. I did rollback to the previous version of WP, but the issue persists. The behavior is the same in my staging and live site, so I pared back the staging to just WC to see if it was a plugin conflict, but it wasn’t.

    Any help or advice appreciated.

    -Ron

Viewing 5 replies - 1 through 5 (of 5 total)
  • Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @netizenron!

    That error indicates that something is outputting additional debug information before the AJAX data — and it’s usually caused by either your theme or another plugin

    Official debug steps for this error can be found here: https://mikejolley.com/2015/11/12/debugging-unexpected-token-in-woocommerce-2-4/

    Please do a full conflict test as per the following documentation to see where it is coming from:

    https://docs.woocommerce.com/document/how-to-test-for-conflicts/

    Cheers!

    Thread Starter Ron Phillips

    (@netizenron)

    Hi @rynald0s,

    If you read my post in its entirety, you’d see where in staging I did deactivate all the plugins. I did forget to mention that I changed themes, which was my first consideration since I’m using Divi.

    The link to unexpected token isn’t applicable. Though it did point me to looking at Network tab in DevTools, unfortunately, resulting in no clues.

    -Ron

    Thread Starter Ron Phillips

    (@netizenron)

    Hi @rynald0s,

    I performed a backup of the site database. I then created a fresh installation of WP with WC. WC worked as expected. I then did a restore of the site database to the fresh installation, and the issue emerged again.

    This would suggest that there is something in the database that is being passed when loading the admin pages that is breaking JSON/React JS. Are there any option or setting fields that I should check in the database to see if they are malformed?

    And given that I do not have a large inventory, what’s the best way to remove WC from the database. I’ve uninstalled/deleted WC plugin, but the data was still available when reinstalled.

    -Ron

    Thread Starter Ron Phillips

    (@netizenron)

    Hi @rynald0s,

    It turns out it was an issue with react trying to parse the key woocommerce_admin_activity_panel_inbox_last_read from the usermeta table. Deleted the row, and WC dashboard works again. What a weird issue.

    -Ron

    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @netizenron!

    Thanks for circling back and letting us know what the issue was, where it was coming from, and how you went about resolving it. This is golden! A strange one indeed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Main Admin Panel blank’ is closed to new replies.