MODX Community

MIGX Stuck Loading When Adding Slide

I created a migx Tv to handle slides, however when I try to add a slide to the tv, it gets stuck on “Loading…” with a spinning circle to the left of it. I have made plenty of migx TVs in the past, but have never run into this problem. Normally if there was an issue with the JSON, I would be told as such when trying to add a record. I reinstalled migx, but that did not fix the issue. Has anyone run into this problem before?

Form Tabs JSON

[
    {
      "MIGX_id":7,
      "caption":"Slide",
      "print_before_tabs":"0",
      "fields":[
        {
          "MIGX_id":28,
          "field":"slide_type",
          "caption":"Slide Type",
          "description":"Image or Weather slide.",
          "description_is_code":"0",
          "inputTV":"slide_type",
          "inputTVtype":"radio",
          "validation":"required",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"Image==1||Weather==2",
          "default":1,
          "useDefaultIfEmpty":1,
          "pos":1
        },
        {
          "MIGX_id":29,
          "field":"slide_caption",
          "caption":"Slide Caption",
          "description":"Caption at bottom of slide.",
          "description_is_code":"0",
          "inputTV":"slide_caption",
          "inputTVtype":"text",
          "validation":"required",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":2
        },
        {
          "MIGX_id":30,
          "field":"slide_image",
          "caption":"Image for Slide",
          "description":"Select image for display if an image slide. Will not show for weather slides.",
          "description_is_code":"0",
          "inputTV":"slide_image",
          "inputTVtype":"image",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":[
            {
              "MIGX_id":1,
              "context":"",
              "sourceid":""
            }
          ],
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":3
        },
        {
          "MIGX_id":31,
          "field":"weather_lat",
          "caption":"Latitude",
          "description":"Latitude of location to retrieve weather forecast",
          "description_is_code":"0",
          "inputTV":"weather_lat",
          "inputTVtype":"",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":4
        },
        {
          "MIGX_id":32,
          "field":"weather_lng",
          "caption":"Longitude",
          "description":"Longitude of location to retrieve weather forecast",
          "description_is_code":"0",
          "inputTV":"weather_lng",
          "inputTVtype":"text",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":5
        },
        {
          "MIGX_id":33,
          "field":"weather_api",
          "caption":"Weather Service API",
          "description":"Dark Sky Weather API Key",
          "description_is_code":"0",
          "inputTV":"weather_api",
          "inputTVtype":"text",
          "validation":"",
          "configs":"",
          "restrictive_condition":"",
          "display":"",
          "sourceFrom":"config",
          "sources":"",
          "inputOptionValues":"",
          "default":"",
          "useDefaultIfEmpty":"0",
          "pos":6
        }
      ],
      "pos":1
    }
  ]

Grid Columns JSON

[
    {
      "MIGX_id":1,
      "header":"Caption",
      "dataIndex":"slide_caption",
      "width":100,
      "sortable":"false",
      "show_in_grid":1,
      "customrenderer":"",
      "renderer":"",
      "clickaction":"",
      "selectorconfig":"",
      "renderchunktpl":"",
      "renderoptions":"",
      "editor":""
    }
  ]

EDIT: I did some digging and it has happened if there is and issue with permissions or mod_security, but I don’t get an error in the error logs like what happened in those threads.

1 Like

mod_security will not lead to errors, only on your hoster’s side.

I didn’t think about mod_security at first, but it does cause the problem of not being able to create/save some things like chunks or snippets, and it can be very specific (say, resources snippets templates all save but chunks do not).

It may be useful to contact your hoster and ask if any mod_security rules have been triggered recently, but I don’t know if this behavior is related…its unusual and I would think the problem wouldn’t be making the resource but saving it…unless MIGX automatically tries to save the new slide, which it could

Any errors in the browsers’ developer console? Could be a JavaScript error as well as a php (or indeed mod_security) error in an AJAX request.

1 Like

While I used the migx cmp to build the json, it turns out it it was the radio button for some reason. I simply switched it to a selectbox input and that fixed it. I didn’t even change the input options. I have no idea why, really no idea. Those options usually work in Tvs just fine.

1 Like

Also, using"required" in validation breaks it.

1 Like