I am trying to utilize more than one "attachment" column in a manual table. It works as expected for one column, the first attachment I put into it. After that, it does not add new attachments to columns where a row already has an attachment added. What am I doing wrong? Please help. Video with a screenshare is attached.
Thank you for recording that Video, it clearly shows the issue.
I am able to reproduce this on my editable Tables, so it seems we have a bug here.
1. For example, if I just use our standard Editing Modal, without the in-line editor as you did;
I can see, if we make a new row, then it works fine, through the Modal we can add multiple columns as attachments and this gets saved.
But, if I try to edit the row that has more than one column as attachments, there is this console error :
Error: Syntax error, unrecognized expression
So, it is as you have shown in your Video - as long as we keep only one attachment Column for each row - that can be edited;
but if we try to edit a row which already has more than one cell of attachments, the error comes up.
2. Or, if we try the inline editor and try to click in any existing row which already has one attachment in it, to upload another attachment column, then we also get the same console error while the table freezes.
I made a short demonstration on my Table, just to see how the images are handled differently than attachments to PDF, for example, or CSV, files like that.
You can download my Video here, if you wish - just to have that additional detail on the ticket.
I am passing this to our QA Team for further testing.
We will report back to let you know how we will proceed further, if we have a temporary fix etc.
We have good news. This is not a bug, it is rather just a current limitation, there are easy solutions, though.
After I checked with our QA Team and we ran more tests, everything is clear.
You can see on this Documentation about the Attachment editor type :
Applicable column types: on the wpDataTables side – URL link and Image;
on the MySQL side, VARCHAR, or TEXT.
Which means, the Attachment Editor is not meant to be used on Columns which are set as "String type" in wpDataTables table.
We will see if we can improve that with our developers in future updates - to set some warning/tooltip in the Table/column when we set a String Column with Attachment Editor, or to disable that Editor type for that case, etc.
On the MySQL Side, if we call data from a database table, we can set it as VARCHAR or TEXT, but in our table, it must not be set to String type.
The Attachment column type is basically the same as URL Link Type - it is just more convenient, because it sets up the Editor type to "attachment" right away;
on the other hand, if you pick "URL type" of the Column, it sets the default editor type to "URL link" by default, which is, as explained here - the format of hyperlink :
Rendering rules: If the content of the cells contains a combination of “two sticks” – || – everything to the left of this combination is used as an URL address for the link, and everything to the right as displayed text. For example:
I recorded a quick demonstration where you can see how we are able to add multiple attachments to the same row, as long as we use one of these three possible Column types for the attachment editor.
Thank you. the Data column "Type" doesn't show as attachment:
Editor input type CAN be attachment. This is what I am using.
For existing files, the thumbnail is huge. But if I upload a new file, then the thumbnail is normal sized.
Question: How can I download the file when it is being displayed in the field? An example is below. All I can do is double-click to engage the save/change/remove attachment input. I don't have the ability to open the file or download it. I might be able to do that with transform, but then I don't know what to set as the thumbnail. In addition, changing to "image" type only shows me images (not PDF's) in the media selector... I can work around that, but wanted to let you know. Edit: I see that I can right click and "open link in new window", but is there a way to just click to open? It seems that having the Attachment editor type makes single clicks not functional and it only takes double-clicks to bring up the attachment editor interface.
Question: when I use the data type of URL Link, I don't get an option to set the text that the link appears as. Is there any way to do that? Is there any way to use Transform to have a URL link display a thumbnail and link? I have a program that will create a thumbnail from whatever URL is provided to it...i just am not sure how I would or could make the Transform column work for that in Image or Link data types. The problem with the Image data type is that I have zapier entering URL's into a couple of those columns, so it isn't going through wpdatatables to get the image in there initially, so there isn't an auto-generated thumbnail. I don't know how to make work what I'm trying to do.
Another Question: when referencing a single cell, it is possible to make that cell editable? I'm referring to the type of shortcode, below. It displays the value, but not within a "Style" that would make me think editable. Is there a switch I can add to the shortcode or anything?
I am trying to utilize more than one "attachment" column in a manual table. It works as expected for one column, the first attachment I put into it. After that, it does not add new attachments to columns where a row already has an attachment added. What am I doing wrong? Please help. Video with a screenshare is attached.
Hi David,
Thank you for recording that Video, it clearly shows the issue.
I am able to reproduce this on my editable Tables, so it seems we have a bug here.
1. For example, if I just use our standard Editing Modal, without the in-line editor as you did;
I can see, if we make a new row, then it works fine, through the Modal we can add multiple columns as attachments and this gets saved.
But, if I try to edit the row that has more than one column as attachments, there is this console error :
Error: Syntax error, unrecognized expression
So, it is as you have shown in your Video - as long as we keep only one attachment Column for each row - that can be edited;
but if we try to edit a row which already has more than one cell of attachments, the error comes up.
2. Or, if we try the inline editor and try to click in any existing row which already has one attachment in it, to upload another attachment column, then we also get the same console error while the table freezes.
I made a short demonstration on my Table, just to see how the images are handled differently than attachments to PDF, for example, or CSV, files like that.
You can download my Video here, if you wish - just to have that additional detail on the ticket.
I am passing this to our QA Team for further testing.
We will report back to let you know how we will proceed further, if we have a temporary fix etc.
Thank you for your patience.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi David,
We have good news. This is not a bug, it is rather just a current limitation, there are easy solutions, though.
After I checked with our QA Team and we ran more tests, everything is clear.
You can see on this Documentation about the Attachment editor type :
Applicable column types: on the wpDataTables side – URL link and Image;
on the MySQL side, VARCHAR, or TEXT.
Which means, the Attachment Editor is not meant to be used on Columns which are set as "String type" in wpDataTables table.
We will see if we can improve that with our developers in future updates - to set some warning/tooltip in the Table/column when we set a String Column with Attachment Editor, or to disable that Editor type for that case, etc.
On the MySQL Side, if we call data from a database table, we can set it as VARCHAR or TEXT, but in our table, it must not be set to String type.
You can choose from three types :
URL Link Column;
or an Attachment column type;
Or the Image column.
-
The Attachment column type is basically the same as URL Link Type - it is just more convenient, because it sets up the Editor type to "attachment" right away;
on the other hand, if you pick "URL type" of the Column, it sets the default editor type to "URL link" by default, which is, as explained here - the format of hyperlink :
Rendering rules: If the content of the cells contains a combination of “two sticks” – || – everything to the left of this combination is used as an URL address for the link, and everything to the right as displayed text. For example:
will be rendered as:
Check out wpDataTables
If the “||” combination is not found in the content, the entire content will be used both for the link and as the display value. For example:
https://wpdatatables.com
will be rendered as:
https://wpdatatables.com
I recorded a quick demonstration where you can see how we are able to add multiple attachments to the same row, as long as we use one of these three possible Column types for the attachment editor.
You can download my Video here if you wish.
I hope that clarifies the functionality.
Let me know how it goes, and if you have any questions.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi,
Thank you. the Data column "Type" doesn't show as attachment:
Editor input type CAN be attachment. This is what I am using.
For existing files, the thumbnail is huge. But if I upload a new file, then the thumbnail is normal sized.
Question: How can I download the file when it is being displayed in the field? An example is below. All I can do is double-click to engage the save/change/remove attachment input. I don't have the ability to open the file or download it. I might be able to do that with transform, but then I don't know what to set as the thumbnail. In addition, changing to "image" type only shows me images (not PDF's) in the media selector... I can work around that, but wanted to let you know. Edit: I see that I can right click and "open link in new window", but is there a way to just click to open? It seems that having the Attachment editor type makes single clicks not functional and it only takes double-clicks to bring up the attachment editor interface.
Question: when I use the data type of URL Link, I don't get an option to set the text that the link appears as. Is there any way to do that? Is there any way to use Transform to have a URL link display a thumbnail and link? I have a program that will create a thumbnail from whatever URL is provided to it...i just am not sure how I would or could make the Transform column work for that in Image or Link data types. The problem with the Image data type is that I have zapier entering URL's into a couple of those columns, so it isn't going through wpdatatables to get the image in there initially, so there isn't an auto-generated thumbnail. I don't know how to make work what I'm trying to do.
Another Question: when referencing a single cell, it is possible to make that cell editable? I'm referring to the type of shortcode, below. It displays the value, but not within a "Style" that would make me think editable. Is there a switch I can add to the shortcode or anything?
[wpdatatable_cell table_id="1" row_id="1" column_key="ntqamountdue" sort="1"]