MIGX
MIGX copied to clipboard
MIGX grid broken on 2.9.4+
Using MODX 2.4.0, MIGX Grid was working perfectly fine before 2.9.4 (e.g. 2.9.3 not impacted):
However, after installing 2.9.4, the grid display is mostly broken:
As you can see, only one column and one row is displayed... restored back to previous version until a fix can be identified.
NOTE: Tried clearing cache and testing in multiple browsers, but same result each time.
In case it helps, I am using raw JSON in the MIGX TV (Form Tabs, Grid Columns, Default Value), I am not using a configuration in this example.
I've upgraded more than one installations to 2.4 with this version of MIGX, but never had seen that isssue. Just upgraded another one, to be sure. I can't think, what can cause it, actually.
Hmm, fwiw, I don't think it's a 2.4 issue, as older MIGX working fine on 2.4.0.
Strange, any chance, I could have access to the installation?
I've had to revert, but I will see if I can duplicate on a MODX cloud instance.
Isn't that a lexicon issue ? It's breaking the grid when I had some lexicon in french which contains ' I'm opening an issue for that
Hmm... I'm not sure. Lexicons weren't being used in either case (separate sites.)
@Bruno17 I have also tested this on migx-2.9.6
and migx-2.9.7
, and am still running into the same issue :frowning:
Until we can identify the root cause, looks like we'll be stuck on MIGX <= 2.9.3
Not sure, possibly related to #202
I still need to determine the exact issue, but should be related to one of these changes
@Bruno17 I think I figured it out! The rendering issue above appears to be related to syncSize()
being commented out (starting in migx-2.9.4
)
//this.syncSize();
Uncommenting the line above appears to fix the grid rendering, showing all columns / cells as expected.
What is the reason for disabling this call? Something to do with "custom grids" ?
Can't remember, why this has been disabled. I'm sure, there was a reason. And I have still not seen your issues. But I can try to enable this line again, and see, if it has other side-effects.
Thanks, Bruno.
NOTE: There are two places in the file where syncSize()
was commented out. The one I linked to was the first I tried, which corrected the issue.
I also had sporadic issues with latest 2.13.0-pl. When opening a resource in manager, sometimes a table with 5 columns (all text-fields with text-editor) the grid will only show 2 columns. When double-clicking into the grid and pressing enter, the grid refreshes and all 5 columns were visible like expected.
I found a "workaround" for me by editing my grid.XXX.config.inc.php and using the "resetWinPosition" action-button for that. In case the grid-display is broken, a click on the button will fix it immediately.
I replaced this.setWinPosition(10,10);
by this.getView().refresh();
:
$gridfunctions['this.resetWinPosition'] = "
resetWinPosition: function(btn,e) {
// this.setWinPosition(10,10);
this.getView().refresh();
}";
I also tried a setTimeout() to call "this.getView().refresh()" after pageload, but it only works when the grid is visible in viewport when calling this function. Maybe there is a focus-event to trigger this refresh()
when the grid becomes visible the first time?
do you have a MIGX - config for me, that I can try to reproduce it?
Of course migx.zip