Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWA-496] [bug]: Not loading Magento2 media image in PWA #2339

Merged
merged 4 commits into from
Apr 21, 2020

Conversation

tjwiebell
Copy link
Contributor

@tjwiebell tjwiebell commented Apr 15, 2020

Description

makeUrl utility doesn't support backend setups that have a path in them. See #2252 for full description.

After this fix, you will still be required to update your upward.yml to the path of your media if it isn't in the standard location of /media. I am comfortable with this, as it should only be necessary in development environments.

Related Issue

Acceptance

Verification Stakeholders

Specification

Verification Steps

IMAGE_OPTIMIZING_ORIGIN=onboard

  1. Setup Venia to use a backing instance with a path in it https://instance.test/with-path/
  2. Verify that images load, and image requests are optimized by Venia (hastily header)
  3. Use the master backing instance, verify images also still load, and are being served/optimized by Venia

IMAGE_OPTIMIZING_ORIGIN=backend

  1. Run through all steps from above, but verify image requests go directly to backing instance

Screenshots / Screen Captures (if appropriate)

Checklist

  • I have updated the documentation accordingly, if necessary.
  • I have added tests to cover my changes, if necessary.

@PWAStudioBot
Copy link
Contributor

PWAStudioBot commented Apr 15, 2020

Messages
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next nightly build run (assuming they are fixed).

Generated by 🚫 dangerJS against bad7c8b

Copy link
Contributor

@sirugh sirugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw you changed one of the tests - does that address the change or do we need to write a new one for this case?

packages/venia-ui/lib/util/makeUrl.js Show resolved Hide resolved
@tjwiebell tjwiebell added the version: Patch This changeset includes backwards compatible bug fixes. label Apr 17, 2020
@dpatil-magento dpatil-magento merged commit 67cb0b0 into develop Apr 21, 2020
@dpatil-magento dpatil-magento deleted the bug/media-url-with-path branch April 21, 2020 16:34
@m2-community-project m2-community-project bot moved this from Review in Progress to Done in Pull Request Progress Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:venia-ui version: Patch This changeset includes backwards compatible bug fixes.
Development

Successfully merging this pull request may close these issues.

[bug]: Not loading Magento2 media image in PWA
4 participants