We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44234
    • 219 Posts
    Quote from: Bruno17 at Oct 01, 2015, 06:10 AM
    Select 'remove' under contextmenues

    Ahh ok I have the buttons now but they don't do anything. Remove dosn't remove and Edit opens the modal but with blank/default fields. Any idea what I've done wrong?
      Find me on Twitter, GitHub or Google+
      • 4172
      • 5,888 Posts
      did you add the id-field to your columns?

      Can be hidden from the grid (Show in Grid: no), but must be added to the columns.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 44234
        • 219 Posts
        Ok I've added the column but its blank, do I need to add a field called 'id' as well? There's nothing in my schema regarding the 'id' table column so should I add:
        <index alias="PRIMARY" name="PRIMARY" primary="true" unique="true">
          <column key="id" collation="A" null="false" />
        </index>
          Find me on Twitter, GitHub or Google+
          • 4172
          • 5,888 Posts
          no, this is done automatically, when you extend xPDOSimpleObject.

          extends="xPDOSimpleObject"
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 4172
            • 5,888 Posts
            what do you have now, when you do an export of your MIGX-configuration?
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 44234
              • 219 Posts
              Still can't get this working. I have added a column to the grid called 'id' which displays but the values are blank. There is a column in my custom table called 'id' which has the row id values correctly.

              My schema:
              <?xml version="1.0" encoding="UTF-8"?>
              <model package="project_pack" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
              	<object class="ProAwards" table="pro_awards" extends="xPDOSimpleObject">
              		<field key="status" dbtype="varchar" precision="100" phptype="string" null="true" />
              		<field key="name" dbtype="varchar" precision="256" phptype="string" null="true" />
              		<field key="body" dbtype="varchar" precision="256" phptype="string" null="true" />
              		<field key="year" dbtype="int" precision="4" phptype="integer" null="true" />
              		<field key="resource_id" dbtype="int" precision="4" phptype="integer" null="true" />
                  <aggregate alias="Resource" class="modResource" local="resource_id" foreign="id" cardinality="one" owner="foreign" />
              	</object>
              </model>
              


              Can you see what I'm missing?
                Find me on Twitter, GitHub or Google+
                • 44234
                • 219 Posts
                Quote from: Bruno17 at Oct 01, 2015, 07:16 AM
                what do you have now, when you do an export of your MIGX-configuration?

                This is the raw config:
                {
                  "formtabs":[
                    {
                      "MIGX_id":18,
                      "caption":"Award Details",
                      "print_before_tabs":"0",
                      "fields":[
                        {
                          "MIGX_id":54,
                          "field":"status",
                          "caption":"Status",
                          "description":"",
                          "description_is_code":"0",
                          "inputTV":"",
                          "inputTVtype":"listbox",
                          "validation":"",
                          "configs":"",
                          "restrictive_condition":"",
                          "display":"",
                          "sourceFrom":"config",
                          "sources":"",
                          "inputOptionValues":"Winner==Winner||Runner Up==Runner Up||Silver Award==Silver Award||Shortlisted==Shortlisted||Highly Commended==Highly Commended||Commended==Commended||Roll of Honour==Roll of Honour||Innovation Award==Innovation Award",
                          "default":"Winner",
                          "useDefaultIfEmpty":"0",
                          "pos":1
                        },
                        {
                          "MIGX_id":55,
                          "field":"name",
                          "caption":"Name",
                          "description":"The Award or Category Name",
                          "description_is_code":"0",
                          "inputTV":"",
                          "inputTVtype":"text",
                          "validation":"",
                          "configs":"",
                          "restrictive_condition":"",
                          "display":"",
                          "sourceFrom":"config",
                          "sources":"",
                          "inputOptionValues":"",
                          "default":"",
                          "useDefaultIfEmpty":"0",
                          "pos":2
                        },
                        {
                          "MIGX_id":56,
                          "field":"body",
                          "caption":"Issuing Body",
                          "description":"",
                          "description_is_code":"0",
                          "inputTV":"",
                          "inputTVtype":"text",
                          "validation":"",
                          "configs":"",
                          "restrictive_condition":"",
                          "display":"",
                          "sourceFrom":"config",
                          "sources":"",
                          "inputOptionValues":"",
                          "default":"",
                          "useDefaultIfEmpty":"0",
                          "pos":3
                        },
                        {
                          "MIGX_id":57,
                          "field":"year",
                          "caption":"Year",
                          "description":"",
                          "description_is_code":"0",
                          "inputTV":"",
                          "inputTVtype":"listbox",
                          "validation":"",
                          "configs":"",
                          "restrictive_condition":"",
                          "display":"",
                          "sourceFrom":"config",
                          "sources":"",
                          "inputOptionValues":"2015==2015||2014==2014||2013==2013||2012==2012||2011==2011||2010==2010||2009==2009||2008==2008||2007==2007||2006==2006||2005==2005||2004==2004||2003==2003||2002==2002||2001==2001||2000==2000",
                          "default":"",
                          "useDefaultIfEmpty":"0",
                          "pos":4
                        }
                      ],
                      "pos":1
                    }
                  ],
                  "contextmenus":"update||duplicate||remove",
                  "actionbuttons":"addItem",
                  "columnbuttons":"",
                  "filters":"",
                  "extended":{
                    "migx_add":"Add Award",
                    "disable_add_item":"",
                    "add_items_directly":"",
                    "formcaption":"",
                    "update_win_title":"",
                    "win_id":"proAwards",
                    "maxRecords":"",
                    "addNewItemAt":"top",
                    "multiple_formtabs":"",
                    "multiple_formtabs_label":"",
                    "multiple_formtabs_field":"",
                    "multiple_formtabs_optionstext":"",
                    "multiple_formtabs_optionsvalue":"",
                    "actionbuttonsperrow":4,
                    "winbuttonslist":"",
                    "extrahandlers":"",
                    "filtersperrow":4,
                    "packageName":"project_pack",
                    "classname":"ProAwards",
                    "task":"",
                    "getlistsort":"",
                    "getlistsortdir":"",
                    "sortconfig":"",
                    "gridpagesize":"",
                    "use_custom_prefix":"0",
                    "prefix":"",
                    "grid":"",
                    "gridload_mode":2,
                    "check_resid":1,
                    "check_resid_TV":"",
                    "join_alias":"",
                    "has_jointable":"yes",
                    "getlistwhere":"",
                    "joins":"",
                    "hooksnippets":"",
                    "cmpmaincaption":"",
                    "cmptabcaption":"",
                    "cmptabdescription":"",
                    "cmptabcontroller":"",
                    "winbuttons":"",
                    "onsubmitsuccess":"",
                    "submitparams":""
                  },
                  "columns":[
                    {
                      "MIGX_id":1,
                      "header":"Status",
                      "dataIndex":"status",
                      "width":160,
                      "sortable":"false",
                      "show_in_grid":1,
                      "renderer":"",
                      "clickaction":"",
                      "selectorconfig":"",
                      "renderchunktpl":"",
                      "renderoptions":"",
                      "editor":""
                    },
                    {
                      "MIGX_id":2,
                      "header":"Name",
                      "dataIndex":"name",
                      "width":300,
                      "sortable":"false",
                      "show_in_grid":1,
                      "renderer":"",
                      "clickaction":"",
                      "selectorconfig":"",
                      "renderchunktpl":"",
                      "renderoptions":"",
                      "editor":""
                    },
                    {
                      "MIGX_id":3,
                      "header":"Issuing Body",
                      "dataIndex":"body",
                      "width":500,
                      "sortable":"false",
                      "show_in_grid":1,
                      "renderer":"",
                      "clickaction":"",
                      "selectorconfig":"",
                      "renderchunktpl":"",
                      "renderoptions":"",
                      "editor":""
                    },
                    {
                      "MIGX_id":4,
                      "header":"Year",
                      "dataIndex":"year",
                      "width":60,
                      "sortable":"false",
                      "show_in_grid":1,
                      "renderer":"",
                      "clickaction":"",
                      "selectorconfig":"",
                      "renderchunktpl":"",
                      "renderoptions":"",
                      "editor":""
                    },
                    {
                      "MIGX_id":5,
                      "header":"id",
                      "dataIndex":"id",
                      "width":"",
                      "sortable":"false",
                      "show_in_grid":1,
                      "customrenderer":"",
                      "renderer":"",
                      "clickaction":"",
                      "selectorconfig":"",
                      "renderchunktpl":"",
                      "renderoptions":"",
                      "editor":""
                    }
                  ]
                }
                
                  Find me on Twitter, GitHub or Google+
                  • 4172
                  • 5,888 Posts
                  everything is looking good. Strange.

                  what do you get with:

                  [[migxLoopCollection?
                  &packageName=`project_pack`
                  &classname=`ProAwards`
                  ]]
                  


                  and with

                  [[migxLoopCollection?
                  &packageName=`project_pack`
                  &classname=`ProAwards`
                  &debug=`1`
                  ]]
                  


                  do you get the id-field, then?

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

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 44234
                    • 219 Posts
                    Quote from: Bruno17 at Oct 01, 2015, 07:32 AM
                    everything is looking good. Strange.

                    what do you get with:

                    [[migxLoopCollection?
                    &packageName=`project_pack`
                    &classname=`ProAwards`
                    &debug=`1`
                    ]]
                    


                    do you get the id-field, then?


                    No getting errors about undefined index...
                    SELECT `ProAwards`.`status`, `ProAwards`.`name`, `ProAwards`.`body`, `ProAwards`.`year`, `ProAwards`.`resource_id` FROM `pro_awards` AS `ProAwards`
                    Notice: Undefined index: id in /core/components/migx/model/migx/migx.class.php on line 344
                    
                    Notice: Undefined index: id in /core/components/migx/model/migx/migx.class.php on line 344
                    
                    Notice: Undefined index: id in /core/components/migx/model/migx/migx.class.php on line 344
                    
                    Notice: Undefined index: id in /core/components/migx/model/migx/migx.class.php on line 344
                    
                    Array
                    (
                        [status] => Winner
                        [name] => ghjghj
                        [body] => hjyh
                        [year] => 2015
                        [resource_id] => 324
                        [_alt] => 1
                        [_first] => 
                        [_last] => 1
                        [idx] => 4
                        [property.packageName] => project_pack
                        [property.classname] => ProAwards
                        [property.debug] => 1
                    )
                    
                    
                      Find me on Twitter, GitHub or Google+
                      • 4172
                      • 5,888 Posts
                      did you change anything at your xpdo-schema, but didn't parse it again?
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!