We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22851
    • 805 Posts
    Just upgraded an installation to MODx 1.0.2. When using Safari or Chrome on Windows I get intrusive ’missing image’ boxes in the manager tree. (See the attached screen-grab.) It appears to be caused by img tags with empty src="" attributes. This doesn’t appear to provoke the same missing image box on Firefox.

    Is this a known problem and is there a fix?

    Thank you.
      YAMS: Yet Another Multilingual Solution for MODx
      YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
      Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
      • 22851
      • 805 Posts
      Several users were complaining about this so I created a fix: Add the following lines to the end of the manager\media\style\MODxCarbon\style.css file:
      /* Hide image placeholders on webkit based browsers
      ---------------------------------------------------------- */
      img[src=""] {
        display: none;
      }


      EDIT: Bug (and fix) reported to Jira bug tracker: http://svn.modxcms.com/jira/browse/MODX-1505
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
        • 25663 MODX Staff
        • 12,272 Posts
        Actually PMS, that seems to be an upgrade that didn’t go as planned, or another minor issue that was resolved recently and is in the patch release codebase. What images is it showing as missing? The correct fix is to make sure they’re there.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 22851
          • 805 Posts
          Hi rthrash.

          Thanks for your reply. I think we’re getting somewhere now. I just did some further investigation. The empty src="" attribute only occurs for non-container documents that have a non-default mime-type (application/xhtml+xml, application/xml, application/javascript, ...). On an Evo 1.0.0 install the ...../images/tree/application.png icon is displayed correctly. However, on both fresh and upgraded Evo 1.0.2 installs the src attribute is empty for such documents, even though the relevant icon is present in both cases. So, this appears to be some regression that has crept into the code between 1.0.0 and 1.0.2.
            YAMS: Yet Another Multilingual Solution for MODx
            YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
            Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
            • 25663 MODX Staff
            • 12,272 Posts
            Check two files: /manager/frames/nodes.php (~lines 30-60) and /manage/media/styles/MODxCarbon/style.php (coincidentally also ~lines 30-60).
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 22851
              • 805 Posts
              Thanks. Found it and fixed it. Newly introduced line 151 of manager/frames/nodes.php...
                              $icon = (($privateweb||$privatemgr) && (isset($icons[$contenttype]))) ? $iconsPrivate[$contenttype] : $icons[$contenttype];
              

              ... doesn’t check whether $contenttype is a recognised private type (ie; $iconsPrivate[$contenttype] is set) before using it to override the default icon. That line should be replaced by:
                              // override only if set...
                              if ($privateweb||$privatemgr)
                              {
                                  if (isset($iconsPrivate[$contenttype]))
                                  {
                                      $icon = $iconsPrivate[$contenttype];
                                  }
                              }
                              else
                              {
                                  if ( isset( $icons[$contenttype] ) )
                                  {
                                      $icon = $icons[$contenttype];
                                  }
                              }
              

              This works on my local install.
                YAMS: Yet Another Multilingual Solution for MODx
                YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
                • 25663 MODX Staff
                • 12,272 Posts
                Good work and please update your JIRA report. Thanks PMS! smiley
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 22851
                  • 805 Posts
                  Done.
                    YAMS: Yet Another Multilingual Solution for MODx
                    YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
                    Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.