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

Add attribute folder as an allowed resource #12187

Closed
wants to merge 1 commit into from
Closed

Add attribute folder as an allowed resource #12187

wants to merge 1 commit into from

Conversation

thaiphan
Copy link
Contributor

Description

Swatches aren't yet configured to be an allowed resource so we can't access them when we switch over to use the database file storage system. This change configures swatches to be an allowed resource.

Manual testing scenarios

  1. Set up a product to use an image-based swatch
  2. Switch over to using database file storage
  3. Delete the pub/media folder
  4. Visit the product page
  5. You should not be able to download the image from the database into the pub/media folder (if the patch it not applied)
  6. You should be able to download the image from the database into the pub/media folder (if the patch is applied)

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@thaiphan
Copy link
Contributor Author

Hey, what's holding up this pull request?

@ishakhsuvarov
Copy link
Contributor

Hi @thaiphan
During manual QA process few questions were raised. We are addressing those now.
Ticket will be updated when it's figured out.

@ishakhsuvarov
Copy link
Contributor

@thaiphan Could you please provide more detailed information on manual testing?
Swatches do not load on the product page after switching storage to the database and clearing chaches.

Here are steps we've been following:

  • Create configurable product with visual swatch configurations.
  • Add images for configurable product and each configurations.
  • Go to Stores -> Configuration -> Advanced -> System -> Storage Configuration for Media
  • Select Media Storage: Database and Media Database: default_setup.
  • Click Synchronize, then Save Config.
  • Clean pub/media directory.
  • Run bin/magento cache:flush
  • Go to Product Page.
  • ❌ Swatches are not rendered.

My assumption is that Swatches module may attempt to load the image file directly at some point and fail to do so.
Please let us know if you have done it in a different way.
Thank you

@thaiphan
Copy link
Contributor Author

Hi @ishakhsuvarov,

There's another file that you might need to delete: /path/to/magento/var/resource_config.json. It'll get re-generated the next time you refresh a page.

You also might want to see if you are routing images through get.php.

Regards,

Thai

@ishakhsuvarov
Copy link
Contributor

@thaiphan
We have tried multiple ways now, but still we are unable to verify that fix is functional.
Could you please provide detailed step-by-step info how you verify this fix?
Thanks!

@ishakhsuvarov
Copy link
Contributor

Hi @thaiphan
Could you please provide some detailed guidance regarding the ways you have tested it? We can not proceed with the merge without checking it works as expected.
Thanks

@ishakhsuvarov
Copy link
Contributor

@thaiphan I am closing this PR for now due to inactivity.
Please reopen and provide more detailed information if you wish to continue.
We can not accept such PRs without manual testing.

Thank you for collaboration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants