We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37971
    • 14 Posts
    Greetings.

    Situation. Site was on dev server and moved to production. On dev everything was okay of course, but on prod MIGX didn't save changes (just show message about saved). Changing default MODx fields (like page title and etc) worked fine.

    Dev:
    * Ubuntu 16.04 with VestaCP on board

    Prod:
    * Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-43-generic x86_64)
    * PHP 5.6.28-1+deb.sury.org~xenial+1 (cli)
    * MySQL Ver 14.14 Distrib 5.7.16, for Linux (x86_64)
    * MODX Revolution 2.5.0-pl

    Will be glad for any help. Thanks.
      • 44665
      • 60 Posts
      sebastian-marinescu Reply #2, 9 years, 10 months ago
      Hi SchizoInside,

      How did you exactly move your site?
      What changes in MIGX didn't save? You mean on a resource, a MIGX-TV of yours?
      Or do you mean you tried to change the MIGX-Configuration and it didn't save?

      Best Regards,
      Sebastian
        • 37971
        • 14 Posts
        Hi Sebastian.

        Quote from: sebastian-marinescu at Nov 24, 2016, 03:38 AM

        How did you exactly move your site?

        Archive files, dump database on DEV then unarchive on PROD and import mysql. Change paths in files, chmod for dirs. Done.

        Quote from: sebastian-marinescu at Nov 24, 2016, 03:38 AM

        What changes in MIGX didn't save? You mean on a resource, a MIGX-TV of yours?
        Or do you mean you tried to change the MIGX-Configuration and it didn't save?

        Yes, on pages in TV tabs where some Tv's is MIGX-TV.

        btw, changes in MIGX-Configuration worked fine.
          • 44665
          • 60 Posts
          sebastian-marinescu Reply #4, 9 years, 10 months ago
          Hi again,

          another badge of questions smiley

          - Do you see anything in the MODX-error-log?

          - Do you see anything in the server-error-log?

          - Are DEV and PROD both using the same db-/server-encodings? Do both use the same PHP-version?

          - How does your MIGX-TV look like or rather what inputs have you configured?
          Is there something special (img-field/etc.)? Can you maybe share a screenshot?

          - Have you tried adding a new resource and trying to change the TV there?

          - Have you tried re-installing MIGX?
            • 37971
            • 14 Posts
            another badge of questions smiley
            Hooray! =)

            - Do you see anything in the MODX-error-log?

            Hmm. Never know about that. Thank you. Here's in log after saving changes migx-tv on resource:
            [2016-11-24 13:44:17] (ERROR @ /var/www/html/core/xpdo/om/xpdoobject.class.php : 240) Error HY000 executing statement: 
            Array
            (
                [0] => HY000
                [1] => 3065
                [2] => Expression #1 of ORDER BY clause is not in SELECT list, references column 'sitemanager.tvtpl.rank' which is not in SELECT list; this is incompatible with DISTINCT
            )
            
            [2016-11-24 13:48:40] (ERROR @ /var/www/html/core/cache/includes/elements/modsnippet/24.include.cache.php : 67) [migxResourceMediaPath]: docid could not be determined.
            [2016-11-24 13:48:40] (ERROR @ /var/www/html/core/cache/includes/elements/modsnippet/24.include.cache.php : 67) [migxResourceMediaPath]: docid could not be determined.
            [2016-11-24 13:48:55] (ERROR @ /var/www/html/core/xpdo/om/xpdoobject.class.php : 240) Error HY000 executing statement: 
            Array
            (
                [0] => HY000
                [1] => 3065
                [2] => Expression #1 of ORDER BY clause is not in SELECT list, references column 'sitemanager.tvtpl.rank' which is not in SELECT list; this is incompatible with DISTINCT
            )
            
            [2016-11-24 13:49:07] (ERROR @ /var/www/html/core/xpdo/om/xpdoobject.class.php : 240) Error HY000 executing statement: 
            Array
            (
                [0] => HY000
                [1] => 3065
                [2] => Expression #1 of ORDER BY clause is not in SELECT list, references column 'sitemanager.tvtpl.rank' which is not in SELECT list; this is incompatible with DISTINCT
            )


            - Do you see anything in the server-error-log?
            Nothing there.

            - Are DEV and PROD both using the same db-/server-encodings? Do both use the same PHP-version?
            Yes.

            - How does your MIGX-TV look like or rather what inputs have you configured?
            Is there something special (img-field/etc.)? Can you maybe share a screenshot?


            - Have you tried adding a new resource and trying to change the TV there?
            Yes. Adding new element in MIGX-tv, save changes, modx tell me "saved", reload manage page, MIGX-tv has zero elements.

            - Have you tried re-installing MIGX?
            Yes. That's PROD 2.0. =(
              • 44665
              • 60 Posts
              sebastian-marinescu Reply #6, 9 years, 10 months ago

              - Have you tried adding a new resource and trying to change the TV there?
              Yes. Adding new element in MIGX-tv, save changes, modx tell me "saved", reload manage page, MIGX-tv has zero elements.

              Have you added a new MIGX-tv-element into a new resource and tried saving it there?
              I emphasize again, because I think you tried in a resource, which already had data in the MIGX-tv.

              If you didn't try in a new/empty resource, and after doing so, it works,
              then it seems that your data in the tvs is compromised
              (or at least not encoded like your environment wants it -
              in that case try emptying the migx-data one-by-one and see where the faulty value is in).

              If you really did try in a new resource and it didn't work,
              then please provide your entire json-config for your MIGX.
              Go to the MIGX-Custom-Manager-Page ( /manager/?a=index&namespace=migx&configs=packagemanager||migxconfigs||setup ), and right-click on your config and press "Export/Import". After that a popup with the json-config will show up (see attached file).
              Or if you just added configuration into the tv-page, then provide that.

              - How does your MIGX-TV look like or rather what inputs have you configured?
              Is there something special (img-field/etc.)? Can you maybe share a screenshot?


              Okay, so it's for a slider/slideshow, yeah? smiley
                • 37971
                • 14 Posts

                Have you added a new MIGX-tv-element into a new resource and tried saving it there?
                I emphasize again, because I think you tried in a resource, which already had data in the MIGX-tv.

                I've tried add new data to existing MIGX-tv on new&empty resource. And didn't work.

                Okay, so it's for a slider/slideshow, yeah? smiley
                Something like that, yeah.

                If you really did try in a new resource and it didn't work,
                then please provide your entire json-config for your MIGX.

                Here it is:
                {
                  "formtabs":[
                    {
                      "MIGX_id":1,
                      "caption":"main",
                      "print_before_tabs":"0",
                      "fields":[
                        {
                          "MIGX_id":1,
                          "field":"image",
                          "caption":"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
                          "description":"",
                          "description_is_code":"0",
                          "inputTV":"",
                          "inputTVtype":"image",
                          "validation":"",
                          "configs":"",
                          "restrictive_condition":"",
                          "display":"",
                          "sourceFrom":"config",
                          "sources":"",
                          "inputOptionValues":"",
                          "default":"",
                          "useDefaultIfEmpty":"0",
                          "pos":1
                        },
                        {
                          "MIGX_id":2,
                          "field":"caption",
                          "caption":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
                          "description":"",
                          "description_is_code":"0",
                          "inputTV":"",
                          "inputTVtype":"text",
                          "validation":"",
                          "configs":"",
                          "restrictive_condition":"",
                          "display":"",
                          "sourceFrom":"config",
                          "sources":"",
                          "inputOptionValues":"",
                          "default":"",
                          "useDefaultIfEmpty":"0",
                          "pos":2
                        },
                        {
                          "MIGX_id":3,
                          "field":"text",
                          "caption":"\u041f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
                          "description":"\u0414\u043e\u0441\u0442\u0443\u043f\u0435\u043d HTML",
                          "description_is_code":"0",
                          "inputTV":"",
                          "inputTVtype":"textarea",
                          "validation":"",
                          "configs":"",
                          "restrictive_condition":"",
                          "display":"",
                          "sourceFrom":"config",
                          "sources":"",
                          "inputOptionValues":"",
                          "default":"",
                          "useDefaultIfEmpty":"0",
                          "pos":3
                        }
                      ],
                      "pos":1
                    }
                  ],
                  "contextmenus":"",
                  "actionbuttons":"",
                  "columnbuttons":"",
                  "filters":"",
                  "extended":{
                    "migx_add":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u043d\u043d\u0435\u0440",
                    "disable_add_item":"",
                    "add_items_directly":"",
                    "formcaption":"",
                    "update_win_title":"",
                    "win_id":"",
                    "maxRecords":"",
                    "addNewItemAt":"bottom",
                    "multiple_formtabs":"",
                    "multiple_formtabs_label":"",
                    "multiple_formtabs_field":"",
                    "multiple_formtabs_optionstext":"",
                    "multiple_formtabs_optionsvalue":"",
                    "actionbuttonsperrow":4,
                    "winbuttonslist":"",
                    "extrahandlers":"this.handleColumnSwitch",
                    "filtersperrow":4,
                    "packageName":"",
                    "classname":"",
                    "task":"",
                    "getlistsort":"",
                    "getlistsortdir":"",
                    "sortconfig":"",
                    "gridpagesize":"",
                    "use_custom_prefix":"0",
                    "prefix":"",
                    "grid":"",
                    "gridload_mode":1,
                    "check_resid":1,
                    "check_resid_TV":"",
                    "join_alias":"",
                    "has_jointable":"yes",
                    "getlistwhere":"",
                    "joins":"",
                    "hooksnippets":"",
                    "cmpmaincaption":"",
                    "cmptabcaption":"",
                    "cmptabdescription":"",
                    "cmptabcontroller":"",
                    "winbuttons":"",
                    "onsubmitsuccess":"",
                    "submitparams":""
                  },
                  "columns":[
                    {
                      "MIGX_id":2,
                      "header":"Published",
                      "dataIndex":"published",
                      "width":10,
                      "sortable":"false",
                      "show_in_grid":1,
                      "customrenderer":"",
                      "renderer":"this.renderSwitchStatusOptions",
                      "clickaction":"switchOption",
                      "selectorconfig":"",
                      "renderchunktpl":"",
                      "renderoptions":[
                        {
                          "MIGX_id":1,
                          "name":"published",
                          "use_as_fallback":1,
                          "value":1,
                          "clickaction":"switchOption",
                          "handler":"",
                          "image":"assets\/components\/migx\/style\/images\/cb_ticked.png"
                        },
                        {
                          "MIGX_id":3,
                          "name":"published",
                          "use_as_fallback":"",
                          "value":1,
                          "clickaction":"switchOption",
                          "handler":"",
                          "image":"assets\/components\/migx\/style\/images\/cb_ticked.png"
                        },
                        {
                          "MIGX_id":2,
                          "name":"unpublished",
                          "use_as_fallback":"",
                          "value":"0",
                          "clickaction":"switchOption",
                          "handler":"",
                          "image":"assets\/components\/migx\/style\/images\/cb_empty.png"
                        }
                      ],
                      "editor":""
                    },
                    {
                      "MIGX_id":1,
                      "header":"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
                      "dataIndex":"image",
                      "width":30,
                      "sortable":"false",
                      "show_in_grid":1,
                      "customrenderer":"",
                      "renderer":"this.renderImage",
                      "clickaction":"",
                      "selectorconfig":"",
                      "renderchunktpl":"",
                      "renderoptions":"",
                      "editor":""
                    },
                    {
                      "MIGX_id":3,
                      "header":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",
                      "dataIndex":"caption",
                      "width":"",
                      "sortable":"false",
                      "show_in_grid":1,
                      "customrenderer":"",
                      "renderer":"",
                      "clickaction":"",
                      "selectorconfig":"",
                      "renderchunktpl":"",
                      "renderoptions":"",
                      "editor":""
                    }
                  ]
                }
                  • 44665
                  • 60 Posts
                  sebastian-marinescu Reply #8, 9 years, 10 months ago
                  Hi again,

                  so I talked just a bit with the Extra's Author over in Slack.

                  He read reports from other users unable to save a migx-tv. Many had problems with the JSON-transfer because of some restriction in Apache's mod_security-module. See the following forum-threads I have found:

                  https://forums.modx.com/thread/?thread=100116
                  https://forums.modx.com/thread/84821/migx-with-gallery-not-rendering-thumbs-correctly-with-image-tv-in-revo-2-2-7

                  Also, like mentioned in one of the posts, please try to debug in the front-end of the manager via your Developer-Tools (F12, or CTRL+SHIFT+I) in the Console- or on the Network-Tab. Please see if there is an error in the console (on load/add/save). And after adding a new migx-entry or after saving the resource, please check the network for the responses – maybe it's going to give you/us more information about what's going on.