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

extend "File URL Replacement" options #336

Closed
2 of 3 tasks
ewsopp opened this issue Jan 8, 2019 · 16 comments
Closed
2 of 3 tasks

extend "File URL Replacement" options #336

ewsopp opened this issue Jan 8, 2019 · 16 comments
Assignees
Milestone

Comments

@ewsopp
Copy link
Member

ewsopp commented Jan 8, 2019

image

  • Change options to the following:

  • Disable

  • Enable Editor

  • Enable Meta

  • Enable Editor & Meta

  • Adjust the description from:

Scans post content and meta during presentation and replaces local media file urls with GCS urls. This setting does not modify your database.

to:

Scans post content and meta during presentation and replaces local media file urls with GCS urls. Depending on the amount of meta, this could be significantly impact performance negatively. This setting does not modify your database.

  • ensure that "File URL Replacement" option is disabled by default for new installations.
@alimuzzaman
Copy link
Contributor

alimuzzaman commented Jan 9, 2019

@ewsopp
What if user had it enabled, then which one it should get migrated to?
Enable Editor & Meta?

@alimuzzaman
Copy link
Contributor

alimuzzaman commented Jan 9, 2019

image

@ewsopp
Copy link
Member Author

ewsopp commented Jan 9, 2019

Correct, if they had it Enable previously we will migrate them to the new Enable Editor & Meta option.

alimuzzaman pushed a commit that referenced this issue Jan 9, 2019
@ewsopp
Copy link
Member Author

ewsopp commented Jan 10, 2019

We need to update the related constant. https://github.com/wpCloud/wp-stateless/wiki/Constants#wp_stateless_media_body_rewrite

  • default value: false
  • options: editor, meta, or true

True would enable both editor and meta scanning. The other options should explain themselves.

This would allow it work well for people who are already using this setting.

@alimuzzaman
Copy link
Contributor

alimuzzaman commented Jan 10, 2019

@ewsopp Options updated.

I think we should add When selecting meta or true to be clear.

Scans post content and meta during presentation and replaces local media file urls with GCS urls. Depending on the amount of meta, this could be significantly impact performance negatively. This setting does not modify your database.

To

Scans post content and meta during presentation and replaces local media file urls with GCS urls. When selecting meta or true depending on the amount of meta, this could be significantly impact performance negatively. This setting does not modify your database.

@antonkorotkov
Copy link
Contributor

I think we should add When selecting meta or true to be clear.

Makes sense

@ewsopp
Copy link
Member Author

ewsopp commented Jan 10, 2019

Agreed

alimuzzaman pushed a commit that referenced this issue Jan 10, 2019
extend "File URL Replacement" options #336
@ewsopp ewsopp assigned antonkorotkov and unassigned alimuzzaman Jan 10, 2019
@antonkorotkov
Copy link
Contributor

@alimuzzaman I think this section should show up for each option from enable group. Right now it only shows up for Editor & Meta.

image

@ewsopp
Copy link
Member Author

ewsopp commented Jan 11, 2019

Also - the options should be Disable, Enable Editor, Enable Meta, and Enable Editor & Meta.

In the screenshot above, it is missing the word "Enable".

alimuzzaman pushed a commit that referenced this issue Jan 13, 2019
@antonkorotkov
Copy link
Contributor

@alimuzzaman this one done as well?

image

alimuzzaman pushed a commit that referenced this issue Jan 14, 2019
@alimuzzaman
Copy link
Contributor

@antonkorotkov Sorry missed it.
Just made a commit.

@renduples
Copy link

You will have to re-open this issue
Upgrading from Version 2.1.9 to 2.2.1 - breaks everything
We have tried every setting for File URL Replacement but no joy.
It incorrectly sets the path in the srcset element

@ewsopp ewsopp reopened this Jan 23, 2019
@ewsopp
Copy link
Member Author

ewsopp commented Jan 23, 2019

@renduples what do you mean by "breaks everything." Can you be more specific?

@ewsopp
Copy link
Member Author

ewsopp commented Jan 23, 2019

I think this may be related to #342. Could you try using the latest version linked to within that issue please?

@renduples
Copy link

Correct after upgrading to 2.2.1 srcset no longer reference Google Cloud but rather wp-uploads

@ewsopp
Copy link
Member Author

ewsopp commented Jan 30, 2019

@renduples the issue with srcset should be resolved with today's v2.2.2 release (see issue #342).

Please upgrade and let us know if you have any more problems. Thank you

@ewsopp ewsopp closed this as completed Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants