Extension talk:Cargo

Display Format Table without Sortable
I would like to display the results of the query in a table, but not allow for that table to be sorted. Format=Table appears to force sorting on. How can I work around this? 2601:C2:8201:6940:0:0:0:42E2 19:20, 16 June 2022 (UTC)


 * Well, the table will always be sorted on something. If you want it to look unsorted, you could always add an "order by=" with some random field that's not in the table, like "order by=_pageID". (Though _pageID will reflect the order in which the pages were created, so maybe that's not ideal either - you could instead do something like "order by=_pageID % 100".) Yaron Koren (talk) 20:04, 16 June 2022 (UTC)


 * You could use format=template to create a table from scratch.


 * Maybe you could use css to hide the arrow icons.


 * Maybe you could use JavaScript to get rid of the class that makes the table sortable. Jonathan3 (talk) 20:11, 16 June 2022 (UTC)


 * Oh... maybe I misunderstood the question. Yaron Koren (talk) 20:15, 16 June 2022 (UTC)
 * Thank you for the reply. Currently, I am using the workaround of hiding the sorting arrows via css changes. Jonathan3's suggestion to remove the headerSort class via javascript is viable, but I would like to avoid bloating my wiki's common.js with changes like this. 2601:C2:8201:6940:0:0:0:42E2 01:28, 17 June 2022 (UTC)
 * Why do you want to disable sorting, if I may ask? Yaron Koren (talk) 02:04, 17 June 2022 (UTC)

table format in lua
Hello how to draw a conclusion in a table

doesn't work, bottom doesn't show (View (previous 50|next 50) (20|50|100|250|500))

Thanks!

--Oleksii 212.80.62.177 10:54, 20 June 2022 (UTC)


 * There is no way to add that specific footer to the end of query results - for the "table" format or otherwise - in Cargo, as far as I know; that interface is really meant for the bottom of special pages. Yaron Koren (talk) 14:07, 20 June 2022 (UTC)

Do not have permission to recreate Cargo data
Hello,

I have installed Cargo extension in bluespice free.

I have a sysops role.

When I try to create a cargo table using ?action=recreatedata I get a permission error

"You do not have permission to recreate Cargo data, for the following reason:

You are not allowed to execute the action you have requested."

What have I to do to get it working ? Vn596174 (talk) 11:45, 22 June 2022 (UTC)


 * That's odd - are you sure you're part of the "sysop" group"? And what version of Cargo are you running? Yaron Koren (talk) 13:59, 23 June 2022 (UTC)
 * I have the same problem. To work around it il did the following:
 * - deactive all bluespice extensions in settings.d, keeping only mediawiki ones
 * - create cargo tables
 * - active all bluespice extensions
 * Now you can add data to cargo tables but still not use recreate data
 * I think this is caused by the way BS uses permissions (see BlueSpicePermissionManager Extension:PermissionManager - MediaWiki) 2001:861:4745:7590:2CB5:7436:1251:3D18 15:41, 30 June 2022 (UTC)

cargoRecreateData throws error after upgrade to MW1.38.1
Hello,

after upgrading to MW 1.38.1, one of my tables is throwing this error for every page when doing cargoRecreateData:

'Image' is one of the fields and is set to NULL in every entry. There are other fields within the same table that are set to NULL but those are not giving any problem.

Thank you very much for your support Carloposo (talk) 08:20, 1 July 2022 (UTC)


 * This may be a silly question, but does the Cargo table actually contain an "Image" field? Yaron Koren (talk) 13:59, 1 July 2022 (UTC)


 * Hello Yaron, yes, it does contain an "Image" field--Carloposo (talk) 07:58, 4 July 2022 (UTC)
 * Yes, indeed... what does the line for "Image" look like in the #cargo_declare call? Yaron Koren (talk) 01:16, 5 July 2022 (UTC)
 * Hello, the #cargo_declare looks like this:
 * Thanks!--Carloposo (talk) 07:49, 5 July 2022 (UTC)


 * Thanks for that listing. You discovered a bug in the handling of "File" fields - sorry about that. I and someone else just checked in a fix for it, so if you get the latest Cargo code, those PHP notices should go away. Yaron Koren (talk) 03:07, 6 July 2022 (UTC)
 * Great, thanks. --Carloposo (talk) 07:44, 6 July 2022 (UTC)
 * Also, there was another error being thrown, which is still present:


 * Thanks for letting me know about that - this, too, is fixed now, I believe. Yaron Koren (talk) 16:53, 6 July 2022 (UTC)
 * I confirm it's fixed. Thanks Yaron. --Carloposo (talk) 09:06, 7 July 2022 (UTC)

Create Class error message "This appears to be a cross-site request forgery - Save cancelled"
What does this error message mean? I had completed defining all the fields for a table, went to save it and got that message. Before entering it all again and hoping for the best, I would prefer to know what I might have done wrong. I had previously deleted the table and was recreating it with less and altered fields, and was following the same process as for an earlier table that did save successfully. I love the Build Class feature, it is a pity there is no Modify Class as well as manually editing templates to add or edit fields is a painstaking task, hence I have found it easier to start again if there is not much in the table yet. I am using Mediawiki 1.36.2 and Cargo 3.1. Thanks, Robert


 * I'm guessing/hoping that it's a one-time thing, and if you try it again it'll work fine. That said, if you want to be able to modify the class with a form, check out the Page Schemas extension. Yaron Koren (talk) 13:56, 8 July 2022 (UTC)