• Resolved amirhossein7

    (@amirhossein7)


    I just wanted to delete some old and unnecessary user metas in the Metadata tab, when I encountered the following message in my browser:

    Server error. Please check your PHP Error Logs.

    Invalid attempt to spread non-iterable instance.
    In order to be iterable, nan-array objects must have a [Symbol.iterator] () method.

    Here are the errors recorded in the error log:

    PHP Fatal error:  Uncaught Error: Invalid table specified in /home/public_html/wp-content/plugins/database-cleaner/classes/admin.php:344
    Stack trace:
    #0 /home/public_html/wp-content/plugins/database-cleaner/classes/rest.php(556): Meow_DBCLNR_Admin->delete_metadata('9LhMIcj_usermet...', Array)
    #1 /home/public_html/wp-includes/rest-api/class-wp-rest-server.php(1181): Meow_DBCLNR_Rest->rest_delete_metadata(Object(WP_REST_Request))
    #2 /home/public_html/wp-includes/rest-api/class-wp-rest-server.php(1028): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/database-clean...', Array, NULL)
    #3 /home/public_html/wp-includes/rest-api/class-wp-rest-server.php(442): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #4 /home/public_html/wp-includes/rest-api.php(410): WP_REST_Server->serve_request('/database-clean...')
    #5 /home/public_html/wp-includes/class-wp-hook.php(308): rest_api_loaded(Object(WP))
    #6 /home/public_html/wp-includes/class-wp-hook.ph in /home/public_html/wp-content/plugins/database-cleaner/classes/admin.php on line 344

    Also, the number of Duplicated Post Metas on my site in the Posts Metadata section of the WordPress core plugin is 428, but when I hit the clean button to delete them, after a long period of time and consecutive percentages of 20% to 80% and Its completion, but it still shows the same 428 and none has been deleted.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @amirhossein7,

    Indeed 🙂 I released a new version to fix this, it is 0.9.4. Can you try it?

    Thread Starter amirhossein7

    (@amirhossein7)

    thanks

    The removal of metadata in the Metadata tab has been fixed, but the Clear Duplicated Post Meta button in the Posts Metadata section of the WordPress Core tab is not working properly.
    When we click on the button, after some time it still shows the same number of Duplicated Post Meta and does not delete any of them.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    Have you tried hovering the little (i) next to the Duplicated Post Meta? I think you’ll get your explanation.

    I will try a way to cache the results so that the counter can go to zero. The problem is that caching those results also take DB space, so it might be counter-productive.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Problem in Metadata tab and Duplicated Post Meta function’ is closed to new replies.