• Resolved douglerner

    (@douglerner)


    I installed the datatable_fixed columns extension and modified the shortccode for a wide table as in the example:

    [table id=123 datatables_fixedcolumns="left" /]

    When I did that the table’s horizontal scrolling didn’t work and the table was shown at its full-width (which of course defeats the purpose of trying to fix the left colum).

    Any idea?

    Thanks,

    doug

    https://www.ads-software.com/extend/plugins/tablepress/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    Thanks for your question. Well, that shouldn’t happen, obviously.
    My assumption is that there’s a JavaScript conflict somewhere.

    Can you please post a link to the page with the table, so that I can take a direct look?

    Thanks,
    Tobias

    Thread Starter douglerner

    (@douglerner)

    Hi.
    This is currently a non-exposed draft (until I get it right and until some announcements are made).

    If you don’t mind, can you email me to doug(at)lerner.net and I can send you a link.

    Currently datatables_fixed is de-activated, but I will activate it for you and add the parameter back in the shortcode if you would like to check it out.

    Thanks!

    doug

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    just as an update for everybody following this thread:

    I’m working with Doug directly at the moment, to find out what’s wrong here.

    From what we have found so far, it looks like all Shortcodes in his posts/pages are evaluated twice, presumably a second time by another plugin or the theme.
    Due to the Shortcode being evaluated twice, a JavaScript function is embedded twice, as TablePress assumes (and it must do so) that a table is shown twice on the page. However, the return value of the second evaluation is not printed to the page, so that a JS error is the result, which then breaks the rest of the JS as well.

    We are working to find out what plugin/theme is causing this, in order to fix this issue on Doug’s site.

    Regards,
    Tobias

    Tobias,

    Any success?

    Thanks,
    Ian

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Ian,

    no, not yet, but we haven’t been actively working on this.

    Did you have any success with the idea of deactivating all other plugins as suggested in the other thread at https://www.ads-software.com/support/topic/alternating-rows-sometimes-not-working ?

    Regards,
    Tobias

    Tobias,

    I updated the other thread. Still no luck.

    Thanks,
    Ian

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yeah, just saw that and replied there. I suggest we continue the investigation via email and then post a summary here, once we find the solution.

    Regards,
    Tobias

    Hi Tobias,

    Did you manage to resolve this? I am running into the same issue with my custom theme. Trials with the 2012 theme doesn’t work either. I am using the following shortcode to display my table, which is 8 (rows) x 11 (cols).

    [table id=1 datatables_colvis=”true” datatables_tabletools=”true” datatables_fixedcolumns=”left” /]

    When I try to fix the left most column with the “datatables_fixedcolumns=”left” short code, the horizontal scrolling disappears. When I remove this condition, it reappears. I tried fixing the header and the issue is reproducible.

    My entire table shortcode is:
    [table id=1 datatables_colvis=”true” datatables_tabletools=”true” datatables_fixedcolumns=”left” /]

    I have disabled all plugins except the tablepress plugin. I’m using WordPress 3.5.1 and 2012 theme for reproducing this error.

    BTW, I’m developing the site on my local XAMPP installation. Can you help me further here, please?

    Best Regards,
    Mithun

    Hi Tobias,

    I just found out a thread that documents a similar issue: https://datatables.net/forums/discussion/5033/datatables-column-filter-add-on-for-the-data-table/p1

    Following the logic, I removed one of the constraints; the scrolling and column fixation seems to work. Apparently, this is an issue with wrappers:

    The reason of this changes is when the datatable have scrolling enabled. Internally datatables create one Wrapper Div called <TableID>_Wrapper and inside three more divs: One for the table Header, another for the data (the original table) and finally one for the footer. The oTable variable gets the information from the second table (data table), but we want to put our textboxes inside the datatables footer (third div). That’s the reason of making the TableWrapper variable

    Can you provide a fix, please?

    Thanks,
    Mithun

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Unfortunately, I’m not an expert with these JS extensions of the DataTables JS library, as I’m not their developer, but I only use them in TablePress.
    The fact that you are working on a local server makes this even harder to debug ??

    Now, one reason might be interference from the three TablePress Extensions. I’m quite sure that ColVis, TableTools and FixedColumns are not compatible out of the box.
    Therefore, please start with only this Shortcode:

    [table id=1 datatables_fixedcolumns="left" /]

    Additionally, uncheck the “Horizontal Scrolling” checkbox on the “Edit” screen of the table, as the Extension has its own solution for that.

    Regards,
    Tobias

    Hi Tobias,

    Thanks a ton for your help. It appears that multiple plugins cause a rumble in the jungle!

    Following your instructions, I disabled horizontal scrolling and fixed the columns after deactivating all other plugins. The leftmost column is now fixed, but the entire table, including the leftmost column, moves upon scrolling. So, I have 2 leftmost columns, one fixed and the other moving with the rest of the table.

    I tried various permutations of the 3 plugins and it appears that colvis and table tools plugin could live peacefully together. Things go awry when fixing the column. Do you have any workarounds for this? I’m wondering how the other guys managed to get this running? Or, am I the only one trying to pump all the plugins for features?

    BTW, I have a feature request, but will document that in another thread! Your help in getting this baby singing is highly appreciated!

    Best Regards,
    Mithun

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, the problem basically is that all these three Extensions need to change the same part of the code (namely that to initialize the DataTables JS library). They then kind of overwrite certain parts of each other.
    To make all of them work together, they would have to be combined into one common Extension, which will require some custom programming though.

    The other people in this thread don’t use three Extensions on one table at the same time, that’s why they don’t get the problem.

    Regards,
    Tobias

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘datatables_fixedcolumns seems to break horizontal scrolling’ is closed to new replies.