Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-20821

Saving an existing premium product breaks the image URLs

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.22
    • Fix Version/s: 4.7.24
    • Component/s: CiviContribute
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      Steps to reproduce:

      1. Begin with CiviCRM 4.7.22 (master) on Drupal 7
      2. Go to /civicrm/admin/contribute/managePremiums?reset=1
      3. Add Premium
        1. Name: "Foo"
        2. Premium Image: "Upload from my computer" > (browse to upload an image file)
        3. Minimum Contribution Amount: 5
        4. Market Value: 5
        5. Save
      4. Foo > Edit
      5. Expect and observe that the values for "Image URL" and "Thumbnail URL" both begin with /sites/default/files/civicrm
      6. Make no changes to the form
      7. Save
      8. Foo > Edit (again)
      9. Expect the same values for "Image URL" and "Thumbnail URL"
      10. Observe that these values now begin with /files/civicrm instead of /sites/default/files/civicrm

      Implications:

      • Any edits to premium products will break the display of images

      Workaround:

      1. When editing a premium product, prepend both URL fields with /a/a

        Attachments

          Activity

            People

            • Assignee:
              seanmadsen Sean Madsen
              Reporter:
              seanmadsen Sean Madsen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: