Johann Heyne
Forum Replies Created
-
Thanks for testing and the feedback,
I went through all the steps on the same browser and OS and the issue did not occur. The only idea I have now is that after ACF executes the event for a change, under certain circumstances ACF does not yet have access to the changed DOM (input field of the table). I made a small script timeout on triggering the “changed” event for ACF that might fix the issue in version 1.3.10. Could you please test it again for me?
https://downloads.wordpress.org/plugin/advanced-custom-fields-table-field.1.3.10.zip
To be sure having the latest scripts running in the admin, make a hard page reload.
Cheers,
Johann- This reply was modified 6 years, 5 months ago by Johann Heyne.
Hi,
I still could not reproduce the issue where adding a table row is not previewed and saved. I also testet it with StoutLogic/acf-builder. @sauliusv: Can you please tell me the OS, the browser and its version you are using?
In general, the preview and save buttons of a page uses only the data previewed in the Gutenberg editors preview. Please watch, if adding a table row is reflecting in the Gutenberg preview. If not, something went wrong.
I fixed an issue in updating the table fields data when changing the cell content in version 1.3.10. @sauliusv: Please download and test this version. Does this version makes a change on your 2) issue?
https://downloads.wordpress.org/plugin/advanced-custom-fields-table-field.1.3.10.zipCheers,
Johann- This reply was modified 6 years, 6 months ago by Johann Heyne.
Thanks for confirming the issues. I´m working on it.
Cheers,
JohannForum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Using “Tablepress” causes issuesHi,
you must change
add_shortcode( 'table', 'shortcode_acf_tablefield' );intoadd_shortcode( 'tablefield', 'shortcode_acf_tablefield' );and then using[tablefield field-name="my-tablename"]to output a tablefields table.Cheers,
Johann- This reply was modified 6 years, 6 months ago by Johann Heyne.
- This reply was modified 6 years, 6 months ago by Johann Heyne.
- This reply was modified 6 years, 6 months ago by Johann Heyne.
Forum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Using “Tablepress” causes issuesWell, the issue seems to be a name conflict of two shortcodes named “table”. Did you add a code like
add_shortcode( 'table', … );by yourself in the functions.php?Forum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Using “Tablepress” causes issuesHi,
“Tablepress” uses the shortcode
[table]which you may also defined to output the tablefield´s table. If so, all you have to do is renaming the shortcode for outputting the tablefield table likeadd_shortcode( 'tablefield', … );Cheers,
JohannHi,
I discovered an issue, when I make a cell content change in the table editor in the Gutenberg post sidebar and then click somewhere in the content area and not somewhere in the sidebar. The last change will not displayed in the block preview or the page preview. Sorting columns and rows also not work in the Gutenberg editor. I´m going to fix that. But adding/deleting rows/columns is working just as aspected. I still could not replicate your issue.
Cheers,
JohannHi,
I made a test, placed a table by ACF blocks in a Gutenberg block and everything worked fine. If I add a row, the Gutenberg preview and the page preview showing that new table row. When I publish/save the page the change is on the page. So this should work.
Sorry, I´m not allowed to ask for hands on in this forum. You could try if the issue appears also on a fresh WordPress installation. If not, the issue may is in the theme or an plugin of your other website. You could try another theme and disable plugins to narrow down that issue.
Cheers,
JohannHi,
the issue you described is definitely not the default behavior of the table plugin. That’s why there has to be a problem somewhere. Can you take a look in the console, if there is a JavaScript error on removing or adding a column/row? Do you need help on how to do that?
Cheers,
JohannHi,
I’m not sure what you trying to do.
If you want to predefine a table when creating a new Custom Posts entry. Then you would have to create the data of a table in the database as post meta for the corresponding table field. To get the table data, you could create and save the table as desired in that custom post, copy the code from the post meta of that table field from the database and use it for your script to create a predefined table.
Or if you want the give a default table, if a table is empty…
$table = get_field( 'your_table_field_name' ); if ( empty ( $table ) ) { // defining the data of the default table $table = array( 'header' => array( 'c' => 'Column 1', ), 'body' => array( array( // a column array( // a cell of the column 'c' => 'Cell Value of Column 1', // the value of the cell ), ), ), ); // output code follows… echo '<table border="0">'; // and so on }Cheers,
JohannForum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Custom data-th in tdThis should work…
echo '<tbody>'; foreach ( $table['body'] as $tr ) { echo '<tr>'; foreach ( $tr as $column_index => $td ) { echo '<td data-th="'. $table['header'][ $column_index ]['c'] .'">'; echo $td['c']; echo '</td>'; } echo '</tr>'; } echo '</tbody>';Cheers,
JohannForum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Rest apiHi again,
if you want to edit a table field outside the WordPress UI, there is no table UI script you could use. That is something, I never thought about it until now.
Cheers,
JohannForum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Rest apiHi,
a table field is just a single postmeta entry like a ACF text field in the WordPress database. The table fields data is a serialized array. So it should work in general. But I´m not experienced with the WordPress Rest-Api so much.
Cheers,
JohannForum: Plugins
In reply to: [Table Field Add-on for ACF and SCF] Activation errorThe current WordPress version 5.3 is required. This is because the user interface has changed in this version and I had to adjust the plugin styles.
If you cannot update WordPress to the latest version now, there is a select field with older versions of the plugin for download at the bottom of the following page https://wordpress.org/plugins/advanced-custom-fields-table-field/advanced/. May use the plugin version 1.3.8 that should compatible down to WordPress version 5.2.0.
Cheers,
Johann- This reply was modified 6 years, 7 months ago by Johann Heyne.
Hi andrisig,
please test the following beta version, if this fixes your issue…
https://downloads.wordpress.org/plugin/advanced-custom-fields-table-field.1.3.9.zipThanks!
Johann