We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46876
    • 23 Posts
    Hello! I've been looking around for a solution to this problem, but I can't really seem to find it.

    I've created a custom package using MIGX and it's working fine, except that in the CMP, the image and crosstick renders are appearing as broken images.



    When adding a new entry, the image appears fine in the preview.



    Checking the browser console, the images are pointing to the following paths:

    http://webpuppies.biz/preview/btgrevamp/connectors/system/phpthumb.php?h=60&src=award-01.png&source=1
    http://webpuppies.biz/assets/components/migx/style/images/tick.png

    However the correct paths should be:

    http://webpuppies.biz/preview/btgrevamp/connectors/system/phpthumb.php?h=60&src=award-03.png&source=3
    http://webpuppies.biz/preview/btgrevamp/assets/components/migx/style/images/tick.png

    Anyone have any idea what may be causing the issue or if I missed out any settings? Many thanks!
      • 4172
      • 5,888 Posts
      maybe, you will need to add also the mgr-context to the mediasoure-list.
      How did you setup your mediasources?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 46876
        • 23 Posts
        Hi Bruno!

        Currently there are 4 media sources:



        This is how the Awards media source (which it is referring to) is set up:



        EDIT: Here's how the media source is being referred to in the MIGX package:

          • 46876
          • 23 Posts
          Ah, okay, so I've added the mgr-context as you suggested and it's rendering the Image column perfectly, so that's one issue down!

          However, it is still not rendering the tick image properly. :s
            • 4172
            • 5,888 Posts
            so, what's your MIGX-config(exported) and your xpdo-schema?
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 46876
              • 23 Posts
              Would this be correct?

              Schema:
              <?xml version="1.0" encoding="UTF-8"?>
              <model package="awards" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" version="1.1">
                <object class="Award" table="awards" extends="xPDOSimpleObject" >
                  <field key="name" dbtype="varchar" precision="250" phptype="string" null="false" default="" />
                  <field key="brand" dbtype="varchar" precision="250" phptype="string" null="false" default="" />
                  <field key="description" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
                  <field key="image" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
                  <field key="published" dbtype="int" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />
                </object>
              </model>
              


              MIGX Config:
              {
                "formtabs":[
                  {
                    "MIGX_id":1,
                    "caption":"Add New Award",
                    "print_before_tabs":"0",
                    "fields":[
                      {
                        "MIGX_id":1,
                        "field":"name",
                        "caption":"Award Name",
                        "description":"",
                        "description_is_code":"0",
                        "inputTV":"",
                        "inputTVtype":"",
                        "validation":"",
                        "configs":"",
                        "restrictive_condition":"",
                        "display":"",
                        "sourceFrom":"config",
                        "sources":"",
                        "inputOptionValues":"",
                        "default":"",
                        "useDefaultIfEmpty":"0",
                        "pos":1
                      },
                      {
                        "MIGX_id":2,
                        "field":"brand",
                        "caption":"Recipient",
                        "description":"",
                        "description_is_code":"0",
                        "inputTV":"",
                        "inputTVtype":"",
                        "validation":"",
                        "configs":"",
                        "restrictive_condition":"",
                        "display":"",
                        "sourceFrom":"config",
                        "sources":"",
                        "inputOptionValues":"",
                        "default":"",
                        "useDefaultIfEmpty":"0",
                        "pos":2
                      },
                      {
                        "MIGX_id":3,
                        "field":"description",
                        "caption":"Description",
                        "description":"",
                        "description_is_code":"0",
                        "inputTV":"",
                        "inputTVtype":"richtext",
                        "validation":"",
                        "configs":"",
                        "restrictive_condition":"",
                        "display":"",
                        "sourceFrom":"config",
                        "sources":"",
                        "inputOptionValues":"",
                        "default":"",
                        "useDefaultIfEmpty":"0",
                        "pos":3
                      },
                      {
                        "MIGX_id":4,
                        "field":"image",
                        "caption":"Image",
                        "description":"",
                        "description_is_code":"0",
                        "inputTV":"",
                        "inputTVtype":"image",
                        "validation":"",
                        "configs":"",
                        "restrictive_condition":"",
                        "display":"",
                        "sourceFrom":"config",
                        "sources":[
                          {
                            "MIGX_id":1,
                            "context":"mgr",
                            "sourceid":3
                          },
                          {
                            "MIGX_id":2,
                            "context":"web",
                            "sourceid":3
                          }
                        ],
                        "inputOptionValues":"",
                        "default":"",
                        "useDefaultIfEmpty":"0",
                        "pos":4
                      },
                      {
                        "MIGX_id":5,
                        "field":"published",
                        "caption":"Published?",
                        "description":"",
                        "description_is_code":"0",
                        "inputTV":"",
                        "inputTVtype":"checkbox",
                        "validation":"",
                        "configs":"",
                        "restrictive_condition":"",
                        "display":"",
                        "sourceFrom":"config",
                        "sources":"",
                        "inputOptionValues":"yes==1",
                        "default":1,
                        "useDefaultIfEmpty":"0",
                        "pos":5
                      }
                    ],
                    "pos":1
                  }
                ],
                "contextmenus":"",
                "actionbuttons":"addItem",
                "columnbuttons":"update||publish||unpublish||remove",
                "filters":"",
                "extended":{
                  "migx_add":"Add New Award",
                  "disable_add_item":"",
                  "add_items_directly":"",
                  "formcaption":"",
                  "update_win_title":"",
                  "win_id":"award",
                  "maxRecords":"",
                  "addNewItemAt":"bottom",
                  "multiple_formtabs":"",
                  "multiple_formtabs_label":"",
                  "multiple_formtabs_field":"",
                  "multiple_formtabs_optionstext":"",
                  "multiple_formtabs_optionsvalue":"",
                  "actionbuttonsperrow":4,
                  "winbuttonslist":"",
                  "extrahandlers":"",
                  "filtersperrow":4,
                  "packageName":"awards",
                  "classname":"Award",
                  "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":"Awards",
                  "cmptabcaption":"All Brand Awards",
                  "cmptabdescription":"You can add, remove or edit awards below.",
                  "cmptabcontroller":"",
                  "winbuttons":"",
                  "onsubmitsuccess":"",
                  "submitparams":""
                },
                "columns":[
                  {
                    "MIGX_id":1,
                    "header":"id",
                    "dataIndex":"id",
                    "width":"",
                    "sortable":"false",
                    "show_in_grid":1,
                    "customrenderer":"",
                    "renderer":"",
                    "clickaction":"",
                    "selectorconfig":"",
                    "renderchunktpl":"",
                    "renderoptions":"",
                    "editor":""
                  },
                  {
                    "MIGX_id":2,
                    "header":"Award Name",
                    "dataIndex":"name",
                    "width":"",
                    "sortable":"false",
                    "show_in_grid":1,
                    "customrenderer":"",
                    "renderer":"",
                    "clickaction":"",
                    "selectorconfig":"",
                    "renderchunktpl":"",
                    "renderoptions":"",
                    "editor":""
                  },
                  {
                    "MIGX_id":3,
                    "header":"Recipient",
                    "dataIndex":"brand",
                    "width":"",
                    "sortable":"false",
                    "show_in_grid":1,
                    "customrenderer":"",
                    "renderer":"",
                    "clickaction":"",
                    "selectorconfig":"",
                    "renderchunktpl":"",
                    "renderoptions":"",
                    "editor":""
                  },
                  {
                    "MIGX_id":4,
                    "header":"Description",
                    "dataIndex":"description",
                    "width":"",
                    "sortable":"false",
                    "show_in_grid":1,
                    "customrenderer":"",
                    "renderer":"",
                    "clickaction":"",
                    "selectorconfig":"",
                    "renderchunktpl":"",
                    "renderoptions":"",
                    "editor":""
                  },
                  {
                    "MIGX_id":5,
                    "header":"Image",
                    "dataIndex":"image",
                    "width":"",
                    "sortable":"false",
                    "show_in_grid":1,
                    "customrenderer":"",
                    "renderer":"this.renderImage",
                    "clickaction":"",
                    "selectorconfig":"",
                    "renderchunktpl":"",
                    "renderoptions":"",
                    "editor":""
                  },
                  {
                    "MIGX_id":6,
                    "header":"Published?",
                    "dataIndex":"published",
                    "width":"",
                    "sortable":"false",
                    "show_in_grid":1,
                    "customrenderer":"",
                    "renderer":"this.renderCrossTick",
                    "clickaction":"",
                    "selectorconfig":"",
                    "renderchunktpl":"",
                    "renderoptions":"",
                    "editor":""
                  },
                  {
                    "MIGX_id":7,
                    "header":"Actions",
                    "dataIndex":"",
                    "width":"",
                    "sortable":"false",
                    "show_in_grid":1,
                    "customrenderer":"",
                    "renderer":"this.renderRowActions",
                    "clickaction":"",
                    "selectorconfig":"",
                    "renderchunktpl":"",
                    "renderoptions":"",
                    "editor":""
                  }
                ]
              }
                • 4172
                • 5,888 Posts
                Looks good.
                Did you change the path of your default-mediasource?
                MIGX is using the default-mediasource to get the path to the images for renderCrossTick.
                I never change the path to the default-mediasource.
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 46876
                  • 23 Posts
                  Nope, the default mediasource hasn't been edited or modified actually, which is why I'm also puzzled to why it was pointing to the wrong directory.

                  Is there any other external setting to configure which I might have missed out? I realize it is pointing directly to the domain (webpuppies.biz) instead of the root folder the site is currently in (webpuppies.biz/preview/btgrevamp).