WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
Issue when using wp-table-reloaded and the WP Search widget (11 posts)

  1. iperks
    Member
    Posted 2 years ago #

    We use this plugin quite heavily and really love it, however we have noticed a problem with it in a couple of areas.

    When we use the default WP search widget we get a couple of wp-table-reloaded errors dumped out at various points from the controller-frontend.php file (lines 391 and 421). We've fixed this by putting a simple if (is_array($table['data'])) { ... } check around the foreach loops.

    Seems to work I think because the usage of array_merge changed recently within PHP.

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks for this notice. I'll investigate on how this change in array_merge affects WP-Table Reloaded.

    Can you post what exact error messages you get?

    And do all tables show up as expected on the "List of Tables" screen? Do you have tables with the name or description "(no title)" and "(no description)" there?

    Thanks,
    Tobias

  3. geoffreygordon
    Member
    Posted 2 years ago #

    Help Tobias

    Posted [Plugin WP-Table Reloaded] Wide Table, Scroll Option about 3 hours ago but marked it as resolved by mistake, can you please check it out.

    http://wordpress.org/support/topic/plugin-wp-table-reloaded-wide-table-scroll-option?replies=1

  4. iperks
    Member
    Posted 2 years ago #

    Actually they are warnings not errors but still:

    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /.../wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php on line 392
    Warning: Invalid argument supplied for foreach() in /.../wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php on line 393
    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /.../wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php on line 392
    Warning: Invalid argument supplied for foreach() in /.../wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php on line 393
    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /.../wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php on line 392
    Warning: Invalid argument supplied for foreach() in /.../wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php on line 393
    Warning: Invalid argument supplied for foreach() in /.../wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php on line 422
    Warning: Invalid argument supplied for foreach() in /.../wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php on line 422
    Warning: Invalid argument supplied for foreach() in /.../wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php on line 422

    For us they appear when you're searching for content using the default WP search widget and not in the WP admin area or the post itself. I guess it would be a theme specific issue ...

  5. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks for that.

    Those message likely mean, that (at least) a table of your tables is corrupted. That's what I wanted you to check with that "(no title)" thing. If you then try to edit that table, you will see that the contents are gone.

    This is not a theme issue, and it should not have to do with array_merge either, as I could not find a change that would cause such behavior.

    Regards,
    Tobias

  6. iperks
    Member
    Posted 2 years ago #

    Thanks for the update.

    You may well be correct regarding the corrupt table and now you mention it that does make sense. From my perspective, with hundreds of tables uploaded I can't easily check for corruptions.

    It doesn't appear to matter what the search criteria are, they always give out the warnings regardless of whether any of the returned posts contain a corrupt table or not. As well as getting the warnings at the top of the page I also get them in a "recent posts" section but only after a search is conducted.

    Regards,

    Ian

  7. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Ian,

    yes, you can search for corrupted tables easily.

    Just take a look at your "List of Tables" (in WP-Table Reloaded) and search for tables with the name "(no name)". Those are corrupt.

    Regards,
    Tobias

  8. iperks
    Member
    Posted 2 years ago #

    Hi Tobias,

    All tables have names although I have 3 with a title of 'a' but I can't delete them:
    Fatal error: Cannot use string offset as an array in /.../wp-content/plugins/wp-table-reloaded/views/view-edit.php on line 5

    Regards,
    Ian

  9. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Ian,

    thanks for checking this! A name of "a" likely also means a corrupted table. I don't really see why you can't delete it though...

    Can you try to delete it from the "List of Tables"? (Note: The red "Delete" link will not work (it is broken right now, due to a change in WordPress). Please try to check the checkbox in the left column, in front of the tables with the name "a" and then click the "Delete" button below the list of tables.)

    Regards,
    Tobias

  10. kestintech
    Member
    Posted 2 years ago #

    Hey Tobias,

    I am definitely seeing a "fatal" out of memory problem in my search widget that seems to relate to wp-table-reloaded functionality.

    We are on the latest version of WP and WP-Table-Reloaded v1.7.

    Here is what a search looks like for us: http://www.bj.org/?s=services

    The error is:
    Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 71 bytes) in /{our host file system directory}/wp-content/plugins/wp-table-reloaded/controllers/controller-frontend.php on line 387

    Any ideas on how I can fix that? It is affecting all searches on our site, even though we only have a few 'tables'... We'd love to continue using the plugin because it's awesome and it lets us do so much without programming, but we also would like to make search work again.

  11. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks a lot for your question.

    This is really weird and I have not yet seen this error message in that location.
    Also, I can't spot anything in the code that might cause this at the mentiond line of code...

    A few things that you could try (without a special order, except for point 1):
    1. Create a backup of all tables, by creating a "WP-Table Reloaded Dump File" on the "Plugin Options" screen.
    2. Open each table once (i.e. "Edit" it) and just save, without making changes.
    3. Update to the latest version of WP-Table Reloaded, namely 1.9.2. (Out of curiosity: Why are you still using the old 1.7?)
    4. Can you maybe try to increase the PHP memory limit (see http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP)

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic