- This topic has 9 replies, 3 voices, and was last updated 1 year, 8 months ago by
vast.
-
AuthorPosts
-
October 26, 2020 at 6:49 pm #1505549
vast
When importing a site library e.g. Java, it seems that the import process does not replace references to
gpsites.co
. In doing so it requests resources fromgpsites.co
.For example,
https://gpsites.co/java/wp-content/uploads/sites/55/java-home-1200x675.jpg
,https://gpsites.co/java/wp-content/uploads/sites/55/java.svg
.This results in a site that is non-functional as content security policies such as
Same Origin Policy
block such requests.What options are there to remove all references to
gpsites.co
?October 26, 2020 at 6:59 pm #1505551Leo
StaffCustomer SupportHi there,
Would it work if you simply remove all the media files imported with the template?
Let me know ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 26, 2020 at 7:35 pm #1505563vast
No, it doesn’t.
The SQL queries suggest that there are multiple references to
gpsites.co
which is unexpected.Typically we would anticipate that the import process replaces these with the relevant domain.
So far, we have identified the following tables that reference
https://gpsites.co/java/wp-content/uploads/sites/55/java.svg
for instance.INSERT INTO {table_name}_options
,INSERT INTO {table_name}_posts
When these are manually updated it resolves the issue which is less than ideal as it requires stepping through multiple statements.
October 26, 2020 at 8:05 pm #1505570Leo
StaffCustomer SupportYou could try using a plugin like this to update all the links/reference at once:
https://wordpress.org/plugins/velvet-blues-update-urls/Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 26, 2020 at 8:18 pm #1505571vast
Thanks for the suggestion Leo.
It should be resolved upstream in the build and deploy process. There shouldn’t be a need to rely on third-party plugins.
Could you please provide a solution that is native to GeneratePress?
October 26, 2020 at 8:59 pm #1505591vast
It seems that some of the content URI is included in the stylesheets.
For example, the stylesheet
generateblocks/style-25.css?ver=1603767073
references –gb-container.gb-container-b8cfbc6e:before{content:"";background-image:url(//gpsites.co/java/wp-content/uploads/sites/55/java-home-1200x675.jpg)
andbackground-image:url(//gpsites.co/java/wp-content/uploads/sites/55/java-home-1200x675.jpg);background-repeat:no-repeat;background-position:center center;background-size:cover;z-index:0;position:absolute;top:0;right:0;bottom:0;left:0;transition:inherit;opacity:0.3;}
The solution for resolving this is to select the image from the media library for the affected page/post.
October 27, 2020 at 9:46 am #1506665Tom
Lead DeveloperLead DeveloperThis is a known issue at the moment – we’re working on a solution.
For now, a plugin like Leo suggested is the best solution.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 27, 2020 at 11:23 am #1506838vast
Thanks Tom. Do you have an idea of when it’ll be resolved?
The preference is to use native options with GeneratePress or WordPress. e.g. wp-cli – https://developer.wordpress.org/cli/commands/search-replace/
Would you be able to advise the tables that need to be updated?
October 27, 2020 at 1:59 pm #1506989Tom
Lead DeveloperLead DeveloperWill try to resolve it in 1.13.0.
All of those URLs are in the post_content of each post.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 27, 2020 at 2:57 pm #1507038vast
That’s awesome. It’ll be a life saver ๐
-
AuthorPosts
- You must be logged in to reply to this topic.