DataTables FixedColumns extension does not work
-
When added the DataTables FixedColumns extension to the table with the code datatables_fixedcolumns_left_columns=1 added to the table as instructed, it does not fixed the first column.
The shortcode inserted:
[table id=1 responsive=scroll datatables_fixedcolumns_left_columns=1 /]The page I need help with: [log in to see the link]
-
Hi,
thanks for your question, and sorry for the trouble.
Is the “Use DataTables” checkbox checked on the table’s “Edit” screen? This is mandatory for this to work. The other checkboxes in that section can be turned off.
Regards,
TobiasI just turned it on. It seems to work on desktop but on mobile, the first column is still not fixed.
Sorry said it too soon. It did not work. I only checked the “Use DataTables”.
https://i.imgur.com/oxViBBR.jpg
When I am logged in to the site the fixed screen works, but as soon as I logged out, the fixed screen stopped working.
I don’t know if the responsive=scroll has something to do with it. Because it doesn’t work on mobile at all.
Hi,
indeed, using both
responsive=scrolland the fixed column will not work.
I suggest to remove that parameter for now.Is the URL above still correct? I don’t see the fixed columns feature being activated there.
Regards,
TobiasHi, yes, it is still the same URL. I just removed the responsive=scroll but it won’t scroll at all, so no fixed column 🙂
I also tried checked the “Horizontal Scrolling” but it made no difference.
I need to use the responsive because on mobile it just won’t work and mess up the whole page.
-
This reply was modified 8 years, 3 months ago by
BSR.
Hi,
ok, are you sure that the “Use DataTables” checkbox is checked?
Are you sure that you have installed and activated the TablePress FixedColumns Extension?
If so, it seems that your theme is missing the call to thewp_footer();WordPress function in its footer.php file. Can you maybe check that?Regards,
TobiasHi,
The answer to your first two questions is yes to both.
The theme is set not to call the footer because I made a custom footer so the theme uses it.
-
This reply was modified 8 years, 3 months ago by
BSR.
Hi,
using a custom footer is fine, but that must include the required WordPress PHP function
wp_footer();right before the closing</body>HTML tag.
This is used by many plugins, including TablePress, to e.g. add JavaScript code. Without that line, you will not get the JS functions to work.Regards,
TobiasI have to get the theme’s developers to look at it. But I cannot believe if they would miss that. It is Themify theme and they are a pretty big company.
I put back the responsive=scroll so that at least on mobile it can scroll. Just that the first column not fixed. Is the responsive extension not using js?
One suggestion on the responsive scroll on mobile. Is there way to make the horizontal scroll bar always visible? Because right now the table is displayed seamlessly which means that the user have no way of knowing that the table is scrollable. They may think that the whole table only has a few columns.
Hi,
no, the
scrollandflipmodes of the Extension only use CSS code (and a bit of extra HTML). All this is loaded in the page’s header, which is why this works.I know what you mean with the scroll bar not being visible on mobile. Unfortunately, I haven’t seen a reliable way to turn it always on. This seems to be both iOS and Android default behavior 🙁
Regards,
TobiasHow about the collapse mode? It seems to work ok.
Hi,
that does use JavaScript, indeed. If that works on your page, the
wp_footer();would actually be working already.Regards,
TobiasHi,
I have the Themify team confirmed also that they are calling the function. So I guess there is a problem with:
responsive=scroll, datatables_fixedcolumns_left_columns=1
Hope you can fix this soon.
Hi,
If possible, I’d like to take a direct look at this on your site. Could you therefore please get in touch via email (the address is in the main plugin file “tablepress.php”)? That way, I can investigate this directly. Thanks!
Regards,
Tobias -
This reply was modified 8 years, 3 months ago by
The topic ‘DataTables FixedColumns extension does not work’ is closed to new replies.