Extension talk:Cargo

Using DataTables Styling Options
Currently, the "dynamic table" display option uses mostly default options for DataTables display format. It is highly preferrable to be able to customize DataTables' default styling options. For example: set "compact" mode for DataTables.

Is it possible to enable these options in any way?

Centering Map at Particular Location in Query
Is there a way to force a centering of a map to a particular point in a cargo query? Usually the map is zoomed and positioned such that all the "hits" of the query show and are centered. However, one can force a zoom level to override the computed scale. Is there a way to force a center point as well? That can be done using {{#display_map|center= ...} but I haven't found a way to incorporate that into a cargo query. Parma100 (talk) 13:55, 8 July 2021 (UTC)


 * Unfortunately, no; but a "center" parameter (or "starting bounds", which is what Page Forms has) would be a good idea. Yaron Koren (talk) 15:28, 9 July 2021 (UTC)


 * Okay. Weekend project. I'll see what I can come up with. Parma100 (talk) 16:01, 9 July 2021 (UTC)


 * I've got centering working for all three mapping services. Adds a  parameter and, if no   is specified, adds a zoom parameter to flesh out the services' requirements. Now I'm working on Leaflet clustering. I figure I'll wait until both tasks are working before I submit them for merging. Parma100 (talk) 13:26, 13 July 2021 (UTC)


 * Leaflet clustering now works. I'll be initiating a merge request directly. Parma100 (talk) 03:45, 15 July 2021 (UTC)


 * That's great - I'm looking forward to both patches! Yaron Koren (talk) 00:35, 16 July 2021 (UTC)

Query time span for calendar doesn't quite fit
Hi there! First of all: I love this extension. It is quite powerful.

Though, I have to admit that I only worked with this extension for roughly four hours and already hit what I would call a bug.

The situation given is like this:
 * I've got a simple table for events (Page, Start, End, Server (short name))
 * I would like to display the table in a calendar format
 * The calendar gets shown and some of the data displayed
 * The events in the table may have a time span of a single day or a whole month
 * Wiki is hosted by Miraheze so I don't have any file or database access

The problem is, some events are missing in the calendar. For example, I've got an event which takes place 2021-06-22 to 2021-07-20 and in the month July 2021 it doesn't get displayed. A similar problem occurs in weekly view, too.

The problem at hand (as far as I could analyze it) is with the way the data is being fetched. The GET looks like this:

As you can see, the initial query (and the previous&next buttons) set a limit (start=2021-06-27&end=2021-08-08) to the fetched data. In my eyes, my example event would partly take place in that limit. This might be a bug on fetching the dates within a given time frame. For me myself it would be enough if I could just set a higher threshold for start and end (is there a parameter for this?).

I hope I was able to describe my problem. Please don't hesitate to ask if you need further information or need to see our wiki. Thanks in advance!


 * You did in fact hit a bug! Sorry about that. I just checked in a fix for it - hopefully it will make its way to Miraheze before too long. Yaron Koren (talk) 17:39, 23 July 2021 (UTC)


 * Thanks for the quick fix! Miraheze merged the change into their productive system, too. I can confirm that the fix works fine. I'm looking forward to use Cargo more often in the future! Random visitor 12:48, 02 August 2021 (UTC)

Parsing order effect? Help welcome.
Using semantic mediawiki, I used to have a display programmed as :

I used link= in : http://dufal.fr/w/index.php?title=Mod%C3%A8le:ItemSuite&oldid=17785

Now replaced by link=

but I get a text version like

It seems to me that the parsing of [[Image: happens before the #cargo_query is extracted.

As a result, I cannot replicate with Cargo what used to work very well with SMW.

More specifically,
 * when the TOMEouLIVRE defines the field Image as a string, I see the name of the picture but not the image itself.
 * when the TOMEouLIVRE defines the field Image as a File, I see the image in the standard wikimedia format (framed, and with name under) which breaks my initial format.

Do I get something wrong ?

The first 4 highest level of page http://dufal.fr/wiki/Test use a series of formating of the field in TOMEouLIVRE table which I created to debug. The picture before the first title on that Test page is what I would expect to get (what I used to get with SMW's #show)

Many thanks.

Frederic.


 * Try adding "|no html" to the #cargo_query call. Yaron Koren (talk) 02:57, 8 August 2021 (UTC)

Also suffering from duplicate rows
I have recently forked a wiki from Fandom to my own host which makes use of extensive Cargo templates to store and query data. Unfortunately I'm finding that when I try save a page (via null edit) to create a new entry in a Cargo table the entry is being duplicated. An example can be seen on this page https://www.poewiki.net/wiki/Modifier:AbyssFireColdResistanceJewel1 When I run a null edit this entry gets duplicated and breaks subsequent queries.

Any idea why this might be happening?

Iamacyborg (talk) 21:15, 9 August 2021 (UTC)


 * I can't see this right now - right now there's no real data being stored for that page. Could you replicate the problem? Yaron Koren (talk) 03:14, 10 August 2021 (UTC)


 * You can see the dupes here https://www.poewiki.net/wiki/Special:CargoTables/mods Iamacyborg (talk) 07:18, 10 August 2021 (UTC)
 * Is there any data or additional information I could provide that might make debugging this easier? Iamacyborg (talk) 13:21, 10 August 2021 (UTC)


 * Okay, yes, I see the problem. That's very strange, and I don't know why it's happening. Does it only happen for null edits, or does it persist if you make some actual edit to a page? In any case, recreating the table will probably fix the issue, at least temporarily. Yaron Koren (talk) 14:01, 10 August 2021 (UTC)


 * I noticed in our templates we don't set any particular field as unique, might that be causing these dupes to happen? Iamacyborg (talk) 15:55, 10 August 2021 (UTC)


 * No, that shouldn't affect things - the duplicate check happens (or is supposed to happen) for all rows. Yaron Koren (talk) 21:40, 10 August 2021 (UTC)


 * Hmm, any idea how we might proceed? We have quite a few tables and having to rebuild them daily might get pretty slow, particularly if things break if someone inadvertently modifies or does a null edit of a page. Iamacyborg (talk) 07:22, 11 August 2021 (UTC)


 * I doubt you would have to rebuild them daily - you might only have to rebuild them once, unless null edits are planned to be a regular thing. Yaron Koren (talk) 19:42, 11 August 2021 (UTC)