WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] Limits to TablePress? (55 posts)

  1. ganaxi
    Member
    Posted 1 year ago #

    Hi Tobias,

    I did exactly what you mentioned to get WP-Tables and TablePress working on the same WP installation, and it solved the memory problem, as I mentioned earlier - and the Tables look fine. FYI- I also added the extension for the CSS that you mentioned above to achieve uniform styling of my tables.

    However, I just noticed that as in the example page below, where the table was created using WP-Table Reloaded,
    http://www.gurufundpicks.com/13f-3q2-alf
    I am not able to go to the next page of table entries. i.e., the table displays the first 10 rows, but then the arrows to go to the next page are missing, so I cannot access all of the table entries.

    Please help.

    Thanks,

    Ganaxi

  2. ganaxi
    Member
    Posted 1 year ago #

    Hi, Tobias,

    Forgot to add, the show X entries box at the top of the table does not work either, whether you change it to 10/100/.. - the output is still always the default 10 rows.

    Thanks,

    Ganaxi

  3. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    ah, yes, I can see what you mean. The reason for this is that TablePress uses a more recent version of the JS library than WP-Table Reloaded, and the default CSS is designed for that newer version.
    To fix this, we need to tell WP-Table Reloaded to also use the new version. To do that, please add

    add_filter( 'wp_table_reloaded_url_js_script', 'wp_table_reloaded_new_datatables', 10, 2 );
    function wp_table_reloaded_new_datatables( $url, file ) {
      $url = plugins_url( 'js/jquery.datatables.min.js', TABLEPRESS__FILE__ );
      return $url;
    }

    to the functions.php (or the Extension that you already have).

    Regards,
    Tobias

  4. ganaxi
    Member
    Posted 1 year ago #

    Tobias,

    Thanks for the prompt reply.

    When I added the above extension, I got a fatal error, and the plugin is deactivated now.

    Here is the complete extension file, in case I made some mistake in putting it together, per your instructions:
    <?php
    /*
    Plugin Name: WP-Table Reloaded Extensions
    Plugin URI: http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/extensions/
    Description: Custom Extensions for WP-Table Reloaded
    Version: 1.0
    Author: YOU, Tobias Baethge
    */

    // this is where the actual code goes

    /**
    * Changes Shortcode for WP-Table Reloaded from [table id=N /] to [[tabletoo id=N /]]
    * @author Tobias Baethge
    * @see http://tobias.baethge.com/2010/01/extension-3-changing-the-table-shortcode/
    */
    function wp_table_reloaded_change_table_shortcode( $shortcode ) {
    return 'tabletoo';
    }
    add_filter( 'wp_table_reloaded_shortcode_table', 'wp_table_reloaded_change_table_shortcode' );

    /**
    * extension to replace wp-tables default CSS with tablepress default css
    */
    add_filter( 'wp_table_reloaded_table_css_class', 'tabletoo_add_tablepress_classes', 10, 2 );
    function tabletoo_add_tablepress_classes( $classes, $table_id ) {
    $classes[] = 'tablepress';
    $classes[] = 'tablepress-id-' . $table_id;
    return $classes;
    }

    /**
    * JS library fix for using Tablepress CSS when using WP-Tables Reloaded
    */
    add_filter( 'wp_table_reloaded_url_js_script', 'wp_table_reloaded_new_datatables', 10, 2 );
    functions wp_table_reloaded_new_datatables( $url, file ) {
    $url = plugins_url( 'js/jquery.datatables.min.js', TABLEPRESS__FILE__ );
    return $url;
    }
    ?>

  5. ganaxi
    Member
    Posted 1 year ago #

    This is the message I am getting:

    This plugin has been deactivated because your changes resulted in a fatal error.

    Parse error: syntax error, unexpected T_STRING in /nas/wp/www/cluster-1346/t...p/wp-content/plugins/wp-table-reloaded-extensions.php on line 36

    Thanks,

    Ganaxi

  6. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    argh, there was a typo in my code above (I already fixed it there). "functions" needs to be "function". Sorry about that.
    Please change that and re-activate the Extension.

    Regards,
    Tobias

  7. ganaxi
    Member
    Posted 1 year ago #

    Hi Tobias,

    I am still getting a fatal error, albeit a different one, as follows,

    Parse error: syntax error, unexpected ')', expecting '&' or T_VARIABLE in /nas/wp/www/cluster-1346/t...p/wp-content/plugins/wp-table-reloaded-extensions.php on line 36

    Thanks,

    Ganaxi

  8. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    shoot, there's another typo... I need to be more careful, I guess.
    Please replace "file" with "$file", in same line that already had the "functions" typo.

    Regards,
    Tobias

  9. ganaxi
    Member
    Posted 1 year ago #

    Hi Tobias,

    As they say,
    third time's the charm.

    Thanks,

    Ganaxi

  10. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    ah, very good :-) I was afraid that there might be more typos... Guess, I was lucky this time :-)

    Best wishes,
    Tobias

  11. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    good news: I added a code change to TablePress, that results in much less PHP memory being used on the "All Tables", "Import", and "Export" screens.
    The dev version is available at http://tablepress.org/downloads/tablepress-dev.zip
    With that, it should be possible to have much more tables in TablePress, without running into memory limits.

    Regards,
    Tobias

  12. ganaxi
    Member
    Posted 1 year ago #

    Great! That is good news.

    Thanks, Tobias, for addressing this limitation. It makes TablePress an even better plugin. And now maybe I won't have to break-out my data between TablePress and WP-Tables.

    My host will be testing this on the installation soon.

  13. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    great! Please let me know how things go!

    Regards,
    Tobias

  14. doublet
    Member
    Posted 1 year ago #

    Hi, I've seen that this plugin can't manage large lists, well, I understand that limitations are defined by browser and local computer resources, but I have a couple of things to say :)

    1.- I really used this plugin before and really ADORE IT since is so clean and useful, specially the search and so.
    2.- I really want to try anything to import a 20.000 row CSV into this system. Can you point me to the conclusions for trying to do this manually? no matter how hard could be. But anyway, in case I can finish this, would I face any other issues related to server-side or computer problems in the front end ?

    And also a suggestion: If this problems are faced by the local resources, why don't you add an option in the plugin admin page that loads by default the imported CSV in 10, 100 or 1...0 firsts rows and a variable so user can define how many rows would see in the backend ?

    Sorry for my english .... very difficult for me to explain.

    I hope you could understand me :)

    Thanks for your excellent plugin !!!

  15. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your question! Nice to hear that you like TablePress so much!

    However, I'll have to discourage you from trying this. 20,000 rows will not be fun. You might be able to successfully import this table, but you will then most probably not be able to edit it at all on the "Edit" screen, due to the large amount of textareas that the browser has to handle, and due to which your browser will be slow or even crash.
    (If editing on the "Edit" screen is not a necessity, you might be able to use the trick from http://wordpress.org/support/topic/working-with-large-tables to hide the "Table Content" box, but that's kind of ugly.)
    Additionally, TablePress can only show the entire table on the frontend, which means that the entire data set has to be transmitted to the viewer every time, which can also be slow (depending on the amount of data in the table).

    Thus, a custom solution, based e.g. on a custom mySQL table that you run specific queries on with PHP should be a much better and more performant solution. Of course, you can still use the JS functions (sorting, search, ...) on this by manually adding the DataTables JS library from http://www.datatables.net . All of this will require custom coding though...

    About that suggestion: Yes, that's what I'd love to do, but due to the internal data storage of TablePress, this is not easy to implement :-(

    Sorry for not having better news.

    Regards,
    Tobias

  16. vjaya
    Member
    Posted 11 months ago #

    Hi, First i thank to you gave us a great plugin. Its really cool user friendly plugin. I need some help in this plugin customization. Is there any option to add tablepress import option into front end when guest add the post....Waiting for your reply. Thank you

  17. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,

    thanks for your question!

    Unfortunately, I'm not aware of a solution to this, sorry :-( Tables can only be added or imported from the admin area of WordPress.

    Regards,
    Tobias

  18. vjaya
    Member
    Posted 11 months ago #

    thanks for your reply. May i know the code to display the tablepress form to add my self in somewhere....

  19. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,

    that code is in the file "view-import.php", but the problem will most likely be permissions and stuff like that...

    Regards,
    Tobias

  20. vjaya
    Member
    Posted 11 months ago #

    Is there any chances to add two more fields in the import form ?

  21. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,

    can you explain that in more detail? TablePress doesn't really need more fields, so I'm not sure what you would like to see here.

    Regards,
    Tobias

  22. vjaya
    Member
    Posted 11 months ago #

    Hi,
    I like user can add their table when they add posts. So can you advice me how can do it. Thank you.

    regards
    Jaya

  23. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Jaya,

    sorry, but I don't really know how you could approach this :-( As I said, tables can at the moment only be added from the admin screens of TablePress, but not from somewhere else.
    You might try copy/pasting some code from TablePress, maybe that can work.

    Regards,
    Tobias

  24. vjaya
    Member
    Posted 11 months ago #

    Hi Tobias,
    Can you give me the code for convert import files and copy tables from other website into table?? Because i searched in tablepress but i can't find. Thank you for your early reply.

    Jaya

  25. TobiasBg
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Jaya,

    the code to import tables is all in controller-admin.php and class-import.php.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic