We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14883 ☆ A M B ☆
    • 450 Posts
    I've just set up MIGX for the first time. I followed the tutorial process, but used my own TVs. My MIGX TV has a "start" and an "end" TV, both of which use the Date input format. I'm able to add them on the backend, but on the front end, the placeholders from the last entry keep repeating. Any idea what I need to change? (back-end and front-end screenshots attached)
      • 14883 ☆ A M B ☆
      • 450 Posts
      I got this figured out.

      I was so sure this was repeating a MIGX value on the front end that I didn't even look closely at the actual values it was outputting. They were coming from neither of my MIGX values (the 8:00 and 12:00 times were identical, but the date was entirely wrong).

      Turns out these front-end values were coming from values stored for this resource for the TVs that my MIGX TV is based on. My MIGX TV (conference.timeblock) is based on two TVs: (conference.timeblock.start & conference.timeblock.end). When I was testing these "helper" TVs, before I fully built my MIGX TV, I had them directly associated with this template, and I populated the values for this resource. Later, after I had fully set up my MIGX TV, I un-linked these two "helper" TVs (is that a good name for them?) from the template.

      It turns out, at least in this instance, that if you have old TV values for a given resource, for the helper TVs of the MIGX TV, lying around in your database (even if you've un-linked those TVs from the Template, the values are still gonna be lying around in the database), this completely screws up the functionality of the MIGX TV in the front-end. I have successfully replicated this, at least with this same TV and its helper TVs.

      Is this a known bug in MIGX? Or have I stumbled on something new?
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        That is ugly! And very odd... the getImageList is supposed to be parsing the JSON string from the MIGx TV, which looking at the string in the database is what gets entered into the MIGx tab fields.

        From what I can make of the code, it does indeed override the MIGx values for the "helper" TV with any existing value for that TV for that resource. I wonder if that was intended? And if so, why?
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 14883 ☆ A M B ☆
          • 450 Posts
          Quote from: sottwell at Jan 22, 2013, 12:05 PM
          From what I can make of the code, it does indeed override the MIGx values for the "helper" TV with any existing value for that TV for that resource. I wonder if that was intended? And if so, why?

          I have no idea, but I think those are good questions and the right ones to ask.

          Also, if it was intended, it ought to be in the documentation somewhere.