Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1363

Don't check for "image alt", when updating category item images during import

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2.1-RC1
    • Fix Version/s: 5.2.1
    • Component/s: Data Management
    • Labels:
      None
    • Change Log Group:
      Fixed
    • Change Log Message:
      The category item thumbnail image was never update during CSV import, when "image alt" was empty.
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      In-Portal has such code which used during category item CSV-import process ("restorePrimaryImage" method of "kCatDBEventHandler" class:

      core/kernel/db/cat_event_handler.php:2020
      $has_image_info = $object->GetDBField('ImageAlt') && ($object->GetDBField('ThumbnailImage') || $object->GetDBField('FullImage'));
      if ( !$has_image_info ) {
      	return ;
      }
      

      As we see, if there are no ImageAlt column in file than image field ('ThumbnailImage' or 'FullImage') used for creation or update this image's information is ignored.

      Attached patch fixes this problem by removing check on 'ImageAlt' from condition rule.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                VFedyk Volodymyr Fedyk
                Developer:
                Volodymyr Fedyk
                Reviewer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: