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

Static CMS image urls when using a different (sub)domain for custom admin url #33095

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

engcom-Kilo
Copy link
Contributor

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Static CMS image urls when using a different (sub)domain for custom admin url #32930

Manual testing scenarios (*)

  1. see Static CMS image urls when using a different (sub)domain for custom admin url #32930

Questions or comments

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented May 28, 2021

Hi @engcom-Kilo. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-community-project m2-community-project bot added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels May 28, 2021
@engcom-Kilo
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@Den4ik
Copy link
Contributor

Den4ik commented May 29, 2021

@engcom-Kilo Please look at failed integration test

@engcom-Kilo
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

1 similar comment
@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento magento deleted a comment from magento-automated-testing bot May 31, 2021
@magento magento deleted a comment from magento-automated-testing bot May 31, 2021
@magento magento deleted a comment from magento-automated-testing bot May 31, 2021
@engcom-Kilo
Copy link
Contributor Author

@engcom-Kilo Please look at failed integration test

@Den4ik Fixed

Copy link
Contributor

@Den4ik Den4ik left a comment

Choose a reason for hiding this comment

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

✅ Approved.

@engcom-Kilo Thanks for the update

@engcom-Alfa
Copy link
Contributor

engcom-Alfa commented Jul 8, 2021

Hello @orlangur and @Den4ik,
Thank you for your contribution and collaboration!

I would like to test this Pull Request to unblock and speed up the delivery.
Unfortunately, I am getting my instance ruined by while reproducing by looking into the Issue Description and the Magento Admin Base URL Doc.
Could you please provide more details on how it can be tested?

Below are the steps I am following to reproduce

  • Set up the new instance using the admin base URL : local.magento2pr.com
  • Admin side: Stores » Configuration » General » Content Management » Use Static URLs for Media Content in WYSIWYG: No (This is the default setting)
  • Navigated to Admin panel » Stores » Configuration » Advanced » Admin » Admin Base URL and set the below settings shown in screenshot
    image

Here, After setting to new domain and admin path, the instance logs out as expected. Updated the system host and virtual host with the new domain. Still unable to regain the instance with new domain url, neither using old domain

Kindly update me the complete steps to reproduce the issue, elaborating the step number 3 in the Issue Description.

Thank you in advance!

@engcom-Alfa
Copy link
Contributor

engcom-Alfa commented Jul 28, 2021

Hello @orlangur and @Den4ik,

Tried reproducing the issue in 2.4-develop version before testing the given PR fix code referring PR description/ comments.
Issue is not reproducible and below is the information on this:

Pre Conditions

  1. Installed a fresh 2.4-develop version in my local with sample data.

Reproducible steps

  • Set up the new instance using the admin base URL as local.magento2.com
  • Created a new category in the catalog and uploaded one image to it in the page content section.
  • Admin side: Stores » Configuration » General » Content Management » Use Static URLs for Media Content in WYSIWYG: No (This is the default setting)
  • Navigated to Admin panel » Stores » Configuration » Advanced » Admin » Admin Base URL and set the below settings shown in screenshot providing new sub domain as admin.magento2.com

image

  • Updated the system host and virtual host with the new admin domain.
  • After restarting the system, Validated the image source domain in admin > Catalog > category page.
  • Edited to new image and checked the image source domain.

Expected Issue as per PR description/ comments:

New edited sub domain is not reflected in the image source, old domain is captured

Actual Result

Getting a proper sub domain image source is displayed.
Below are the actual screenshot
image
image

Kindly let me know if there is anything else involved to reproduce apart from above procedure or kindly cross check if it is particular to any specific case!

@Den4ik
Copy link
Contributor

Den4ik commented Jul 29, 2021

Hi @engcom-Alfa
I remember that I reproduced it but don't remember all steps. I'll try to reproduce it today or tomorrow and back with instruction

@engcom-Alfa
Copy link
Contributor

Hi @Den4ik ,
Is it possible to provide me the steps to reproduce please?

@Den4ik
Copy link
Contributor

Den4ik commented Aug 25, 2021

@engcom-Alfa Sorry for delay. I hope to do this in the near future

@engcom-Alfa
Copy link
Contributor

engcom-Alfa commented Oct 20, 2021

✔️ QA Passed

Preconditions:

  1. Installed a fresh 2.4-develop version in my local with sample data (ex- Set up instance using the admin base URL as local.magento2.com)

Manual testing scenario:

  1. Admin side: Stores » Configuration » General » Content Management » Use Static URLs for Media Content in WYSIWYG: No (This is the default setting)

  2. Navigated to Admin panel » Stores » Configuration » Advanced » Admin » Admin Base URL and set the below settings shown in screenshot providing new sub domain as admin.magento2.com

image

  1. Admin Side: Content > Open any CMS page and edit with the new image

  2. Admin side: Content> Select CMS Page > check the newly updated image domain

Before: ✖️ We used to get complete URL in the image path

image

After: ✔️ Only we get relative URL

image

Tested changing the General » Content Management » Use Static URLs for Media Content in WYSIWYG: to Yes and we get the full path of the image!

There is nothing else required to test since it is a specific case where we are checking the image URL, it has no impact on any other feature as such.

@magento-engcom-team
Copy link
Contributor

@engcom-Kilo thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@m2-assistant
Copy link

m2-assistant bot commented Oct 28, 2021

Hi @engcom-Kilo, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Cms Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static CMS image urls when using a different (sub)domain for custom admin url
5 participants