We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40643
    • 36 Posts
    How do I unpublish an item in the CMP? I have selected publish and unpublish in the configuration of a package.

    Thanks

    This question has been answered by multiple community members. See the first response.

      • 4172
      • 5,888 Posts
      as soon, as you have the published - field added to your grid-columns, you should see published or unpublished in the right-click-menue
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 40643
        • 36 Posts
        It's not there. I only see edit, delete and remove.

        Thank you for your assistance.

        Lisa
          • 4172
          • 5,888 Posts
          can post your xpdo-schema and your exported grid-columns (edit-raw in the MIGX-configurator)
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 40643
            • 36 Posts
            xpdo-schema

            <?xml version="1.0" encoding="UTF-8"?>
            <model package="prolists" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
            <object class="Prolists" table="prolists" extends="xPDOSimpleObject">
            <field key="itemheading" dbtype="varchar" precision="255" phptype="string" null="false" default=""/>
            <field key="iteminfo" dbtype="text" phptype="string" null="false" default=""/>

            <field key="createdon" dbtype="datetime" phptype="datetime" null="true"/>
            <field key="createdby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
            <field key="editedon" dbtype="datetime" phptype="datetime" null="true"/>
            <field key="editedby" dbtype="int" precision="10" 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" />

            <aggregate alias="CreatedBy" class="modUser" local="createdby" foreign="id" cardinality="one" owner="foreign"/>
            <aggregate alias="EditedBy" class="modUser" local="editedby" foreign="id" cardinality="one" owner="foreign"/>
            </object>
            </model>

            Grid columns:
            [{"MIGX_id":"1","header":"ID","dataIndex":"id","width":"","sortable":"false","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},{"MIGX_id":"2","header":"Item Heading","dataIndex":"itemheading","width":"","sortable":"false","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},{"MIGX_id":"3","header":"iteminfo","dataIndex":"Item Information","width":"","sortable":"false","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},{"MIGX_id":"4","header":"","dataIndex":"deleted","width":"","sortable":"false","show_in_grid":"0","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"}]

            Also when doing edit-raw I get the following error:

            Warning: array_key_exists() expects parameter 2 to be array, null given in /home/peppermg/public_html/development/saraa/core/components/migx/processors/mgr/migxdb/fields.class.php on line 31

            Thank you
              • 4172
              • 5,888 Posts
              [{"MIGX_id":"1","header":"ID","dataIndex":"id","width":"","sortable":"false","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},
              {"MIGX_id":"2","header":"Item Heading","dataIndex":"itemheading","width":"","sortable":"false","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},
              {"MIGX_id":"3","header":"iteminfo","dataIndex":"Item Information","width":"","sortable":"false","show_in_grid":"1","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"},
              {"MIGX_id":"4","header":"","dataIndex":"deleted","width":"","sortable":"false","show_in_grid":"0","renderer":"","clickaction":"","selectorconfig":"","renderoptions":"[]"}]
              


              As said above, you will need to add the 'published' - field to the grid-columns

              and I think, you did change the dataIndex and Heading here:

              {"MIGX_id":"3","header":"iteminfo","dataIndex":"Item Information"
              
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 40643
                • 36 Posts
                I added the published column and it works great. Thank you. In the published column it has a 1 for published, is there a way for me to put Y instead of 1?

                I changed the dataIndex and heading but I am still getting this error:
                Warning: array_key_exists() expects parameter 2 to be array, null given in /home/peppermg/public_html/development/saraa/core/components/migx/processors/mgr/migxdb/fields.class.php on line 31

                I really appreciate your help.
                • discuss.answer
                  • 4172
                  • 5,888 Posts
                  which version of MIGX are you working with? Thought I had fixed most of this enotice - warnings now.
                  you can set the system-setting debug to 0, if you don't want to get this warnings at all.

                  you can get a nice Tick or Cross if you use the renderer 'this.renderCrossTick' for this column

                  or if you would like to change the status onClick into the column you can try the 'this.renderClickCrossTick' renderer
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 40643
                    • 36 Posts
                    I will try each option to see which is more suitable for my needs.

                    Thanks

                    I am using version 2.4.2
                      • 40643
                      • 36 Posts
                      I tried the methods you described above and they work beautifully on the Admin side but they are not be unpublished on the front of the website.