[Resolved] GeneratePress content imports gpsites.co references

Home Forums Support GeneratePress content imports gpsites.co references

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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 from gpsites.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?

    #1505551
    Leo
    Staff
    Customer Support

    Hi there,

    Would it work if you simply remove all the media files imported with the template?

    Let me know πŸ™‚

    #1505563
    vast

    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.

    #1505570
    Leo
    Staff
    Customer Support

    You could try using a plugin like this to update all the links/reference at once:
    https://wordpress.org/plugins/velvet-blues-update-urls/

    #1505571
    vast

    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?

    #1505591
    vast

    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) and background-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.

    #1506665
    Tom
    Lead Developer
    Lead Developer

    This is a known issue at the moment – we’re working on a solution.

    For now, a plugin like Leo suggested is the best solution.

    #1506838
    vast

    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?

    #1506989
    Tom
    Lead Developer
    Lead Developer

    Will try to resolve it in 1.13.0.

    All of those URLs are in the post_content of each post.

    #1507038
    vast

    That’s awesome. It’ll be a life saver πŸ™‚

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.