We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33969
    • 60 Posts
    I just started using Migx and wish I had looked at it sooner. Great program!

    I am moving a client from Evolution. I am moving all their testimonials, which were in separate resources and TVs, into a table and CMP that I setup using MIGXdb. This will be a LOT easier for the client to manage. Everything seemed to work properly. I was able to write a script to move everything into the table - and the data looks OK.

    The only problem is when I try to display the data in the CMP I can only display the first 19 of 32 pages. When I try to load beyond that the data doesn't load - I just get the spinning 'gif'.

    The data is there and I don't seem to have any problems loading it into the front end - just in the CMP.

    Any pointers would be appreciated.

    This question has been answered by Bruno17. See the first response.

      Michael Regan
      TIMR Web Services
      Phone: 250.218.5284
      Eamil: [email protected]
      Website: timr.ca
      • 5430
      • 247 Posts
      Have you tried increasing the per-page setting in your MIGX config to see if you can access all your records that way? If you can't get past a certain item in your db table no matter how many item per-page you're listing, you might wanna check to see if you have an odd/special character in that specific record that might be jamming things up in your CMP.
        • 33969
        • 60 Posts
        Yes - I tried tried varying the number of items per page. Then I set the number of items per page to 190 and it displayed properly. But, when I set it to 191 - it fails to load.

        I did a bit more testing and found the problem has something to do with the 'sort'. I had set the default sort to 'year' and sort order to 'DESC'. When I removed that - the problem cleared. However, when I did a sort using the 'Column Sort' drop down the problem returned.
          Michael Regan
          TIMR Web Services
          Phone: 250.218.5284
          Eamil: [email protected]
          Website: timr.ca
          • 4172
          • 5,888 Posts
          can you post your exported MIGX-setup and your xpdo-schema, plaese?
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 33969
            • 60 Posts
            For some reason I can't seem to attach the files. I will try pasting them in here.

            There is an error in the schema - I forgot to make 'id' auto-increment. I fixed it in the database table - but didn't update the schema.

            Schema:
            <?xml version="1.0" encoding="UTF-8"?>
            <model package="testimonials" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
                <object class="Testimonial" table="testimonials" extends="xPDOSimpleObject">
                    <field key="id" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
            	<field key="year" dbtype="varchar" precision="4" />
            	<field key="name" dbtype="varchar" precision="50" />
            	<field key="from" dbtype="varchar" precision="50" />
            	<field key="image" dbtype="varchar" precision="255" />
            	<field key="comments" dbtype="varchar" precision="255" />
            	<field key="is_testimonial" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" /> 
            	<field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
            	<field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" /> 
                </object>
            </model>


            MIGX setup:
            {
              "id":3,
              "name":"testimonials",
              "formtabs":[
                {
                  "MIGX_id":2,
                  "caption":"Guest Testimonials",
                  "print_before_tabs":"0",
                  "fields":[
                    {
                      "MIGX_id":9,
                      "field":"name",
                      "caption":"Guest Name",
                      "description":"",
                      "description_is_code":"0",
                      "inputTV":"",
                      "inputTVtype":"",
                      "validation":"",
                      "configs":"",
                      "restrictive_condition":"",
                      "display":"",
                      "sourceFrom":"config",
                      "sources":"",
                      "inputOptionValues":"",
                      "default":"",
                      "useDefaultIfEmpty":"0",
                      "pos":1
                    },
                    {
                      "MIGX_id":10,
                      "field":"from",
                      "caption":"Address",
                      "description":"(optional)Enter the city, prov\/state",
                      "description_is_code":"0",
                      "inputTV":"",
                      "inputTVtype":"",
                      "validation":"",
                      "configs":"",
                      "restrictive_condition":"",
                      "display":"",
                      "sourceFrom":"config",
                      "sources":"",
                      "inputOptionValues":"",
                      "default":"",
                      "useDefaultIfEmpty":"0",
                      "pos":2
                    },
                    {
                      "MIGX_id":11,
                      "field":"comments",
                      "caption":"Guest Comments",
                      "description":"",
                      "description_is_code":"0",
                      "inputTV":"",
                      "inputTVtype":"textarea",
                      "validation":"",
                      "configs":"",
                      "restrictive_condition":"",
                      "display":"",
                      "sourceFrom":"config",
                      "sources":"",
                      "inputOptionValues":"",
                      "default":"",
                      "useDefaultIfEmpty":"0",
                      "pos":3
                    },
                    {
                      "MIGX_id":12,
                      "field":"image",
                      "caption":"Image",
                      "description":"",
                      "description_is_code":"0",
                      "inputTV":"",
                      "inputTVtype":"image",
                      "validation":"",
                      "configs":"",
                      "restrictive_condition":"",
                      "display":"",
                      "sourceFrom":"config",
                      "sources":"",
                      "inputOptionValues":"",
                      "default":"",
                      "useDefaultIfEmpty":"0",
                      "pos":4
                    },
                    {
                      "MIGX_id":15,
                      "field":"year",
                      "caption":"Year",
                      "description":"Year the guest stayed at Two Eagles Lodge",
                      "description_is_code":"0",
                      "inputTV":"",
                      "inputTVtype":"",
                      "validation":"",
                      "configs":"",
                      "restrictive_condition":"",
                      "display":"",
                      "sourceFrom":"config",
                      "sources":"",
                      "inputOptionValues":"",
                      "default":"",
                      "useDefaultIfEmpty":"0",
                      "pos":5
                    },
                    {
                      "MIGX_id":13,
                      "field":"is_testimonial",
                      "caption":"Show",
                      "description":"",
                      "description_is_code":"0",
                      "inputTV":"",
                      "inputTVtype":"checkbox",
                      "validation":"",
                      "configs":"",
                      "restrictive_condition":"",
                      "display":"",
                      "sourceFrom":"config",
                      "sources":"",
                      "inputOptionValues":"yes==1",
                      "default":1,
                      "useDefaultIfEmpty":"0",
                      "pos":6
                    },
                    {
                      "MIGX_id":14,
                      "field":"published",
                      "caption":"Published",
                      "description":"",
                      "description_is_code":"0",
                      "inputTV":"",
                      "inputTVtype":"checkbox",
                      "validation":"",
                      "configs":"",
                      "restrictive_condition":"",
                      "display":"",
                      "sourceFrom":"config",
                      "sources":"",
                      "inputOptionValues":"yes==1",
                      "default":"0",
                      "useDefaultIfEmpty":"0",
                      "pos":7
                    }
                  ],
                  "pos":1
                }
              ],
              "contextmenus":"update||duplicate||publish||unpublish||remove",
              "actionbuttons":"addItem",
              "columnbuttons":"",
              "filters":"",
              "extended":{
                "migx_add":"Add Testimonial",
                "disable_add_item":"",
                "add_items_directly":"",
                "formcaption":"",
                "update_win_title":"",
                "win_id":"testimonial",
                "maxRecords":"",
                "addNewItemAt":"top",
                "multiple_formtabs":"",
                "multiple_formtabs_label":"",
                "multiple_formtabs_field":"",
                "multiple_formtabs_optionstext":"",
                "multiple_formtabs_optionsvalue":"",
                "actionbuttonsperrow":4,
                "winbuttonslist":"",
                "extrahandlers":"",
                "filtersperrow":4,
                "packageName":"testimonials",
                "classname":"Testimonial",
                "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":"Client Testimonials",
                "cmptabcaption":"Add Client Testimonials",
                "cmptabdescription":"Add new client testimonials",
                "cmptabcontroller":"",
                "winbuttons":"",
                "onsubmitsuccess":"",
                "submitparams":""
              },
              "columns":[
                {
                  "MIGX_id":1,
                  "header":"ID",
                  "dataIndex":"id",
                  "width":10,
                  "sortable":true,
                  "show_in_grid":1,
                  "renderer":"",
                  "clickaction":"",
                  "selectorconfig":"",
                  "renderchunktpl":"",
                  "renderoptions":"",
                  "editor":""
                },
                {
                  "MIGX_id":8,
                  "header":"Year",
                  "dataIndex":"year",
                  "width":20,
                  "sortable":true,
                  "show_in_grid":1,
                  "renderer":"",
                  "clickaction":"",
                  "selectorconfig":"",
                  "renderchunktpl":"",
                  "renderoptions":"",
                  "editor":""
                },
                {
                  "MIGX_id":2,
                  "header":"Client Name",
                  "dataIndex":"name",
                  "width":50,
                  "sortable":"false",
                  "show_in_grid":1,
                  "renderer":"",
                  "clickaction":"",
                  "selectorconfig":"",
                  "renderchunktpl":"",
                  "renderoptions":"",
                  "editor":""
                },
                {
                  "MIGX_id":3,
                  "header":"Address",
                  "dataIndex":"from",
                  "width":80,
                  "sortable":"false",
                  "show_in_grid":1,
                  "renderer":"",
                  "clickaction":"",
                  "selectorconfig":"",
                  "renderchunktpl":"",
                  "renderoptions":"",
                  "editor":""
                },
                {
                  "MIGX_id":4,
                  "header":"Comments",
                  "dataIndex":"comments",
                  "width":140,
                  "sortable":"false",
                  "show_in_grid":1,
                  "renderer":"",
                  "clickaction":"",
                  "selectorconfig":"",
                  "renderchunktpl":"",
                  "renderoptions":"",
                  "editor":""
                },
                {
                  "MIGX_id":5,
                  "header":"Path to Image",
                  "dataIndex":"image",
                  "width":70,
                  "sortable":"false",
                  "show_in_grid":1,
                  "renderer":"",
                  "clickaction":"",
                  "selectorconfig":"",
                  "renderchunktpl":"",
                  "renderoptions":"",
                  "editor":""
                },
                {
                  "MIGX_id":6,
                  "header":"Show",
                  "dataIndex":"is_testimonial",
                  "width":20,
                  "sortable":"false",
                  "show_in_grid":1,
                  "renderer":"this.renderClickCrossTick",
                  "clickaction":"",
                  "selectorconfig":"",
                  "renderchunktpl":"",
                  "renderoptions":"",
                  "editor":""
                },
                {
                  "MIGX_id":7,
                  "header":"Published",
                  "dataIndex":"published",
                  "width":30,
                  "sortable":"false",
                  "show_in_grid":1,
                  "renderer":"this.renderClickCrossTick",
                  "clickaction":"",
                  "selectorconfig":"",
                  "renderchunktpl":"",
                  "renderoptions":"",
                  "editor":""
                }
              ],
              "createdby":1,
              "createdon":"2015-06-23 16:15:33",
              "editedby":1,
              "editedon":"2015-06-30 21:38:34",
              "deleted":0,
              "deletedon":null,
              "deletedby":0,
              "published":1,
              "publishedon":null,
              "publishedby":0
            }
              Michael Regan
              TIMR Web Services
              Phone: 250.218.5284
              Eamil: [email protected]
              Website: timr.ca
            • discuss.answer
              • 4172
              • 5,888 Posts
              seems to work fine here.
              But I had changed the schema, using XPDOSimpleObject with no id-field in the schema, before creating the table, because XPDOSimpleObject does handle this automatically.

              Have added 500 Items and sorted by Year.
              Can display all 50 pages.

              <?xml version="1.0" encoding="UTF-8"?>
              <model package="testimonials" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
                  <object class="Testimonial" table="testimonials" extends="xPDOSimpleObject">
                  <field key="year" dbtype="varchar" precision="4" />
                  <field key="name" dbtype="varchar" precision="50" />
                  <field key="from" dbtype="varchar" precision="50" />
                  <field key="image" dbtype="varchar" precision="255" />
                  <field key="comments" dbtype="varchar" precision="255" />
                  <field key="is_testimonial" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" /> 
                  <field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
                  <field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" /> 
                  </object>
              </model>
              



                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 33969
                • 60 Posts
                Quote from: Bruno17 at Jul 01, 2015, 02:37 PM
                seems to work fine here.
                But I had changed the schema, using XPDOSimpleObject with no id-field in the schema, before creating the table, because XPDOSimpleObject does handle this automatically.

                Have added 500 Items and sorted by Year.
                Can display all 50 pages.

                <!--?xml version="1.0" encoding="UTF-8"?-->
                <model package="testimonials" baseclass="xPDOObject" platform="mysql" defaultengine="MyISAM" version="1.1">
                    <object class="Testimonial" table="testimonials" extends="xPDOSimpleObject">
                    <field key="year" dbtype="varchar" precision="4">
                    <field key="name" dbtype="varchar" precision="50">
                    <field key="from" dbtype="varchar" precision="50">
                    <field key="image" dbtype="varchar" precision="255">
                    <field key="comments" dbtype="varchar" precision="255">
                    <field key="is_testimonial" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0"> 
                    <field key="deleted" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0">
                    <field key="published" dbtype="tinyint" precision="1" attributes="unsigned" phptype="integer" null="false" default="0"> 
                    </field></field></field></field></field></field></field></field></object>
                </model>
                




                Thanks for looking at this for me. At least I know the set up is correct and I can start looking in other areas for the problem.
                  Michael Regan
                  TIMR Web Services
                  Phone: 250.218.5284
                  Eamil: [email protected]
                  Website: timr.ca