percussion / percussioncms

Percussion CMS - Content Management System
https://percussioncmshelp.intsof.com/percussioncms
Apache License 2.0
11 stars 9 forks source link

Importing third party JS and CSS incorrectly during import site functionality #1191

Closed ramdev1980 closed 5 months ago

ramdev1980 commented 9 months ago

Describe the bug

If a page has references to CDN hosted javascript or css resources then those are imported to web resources incorrectly. They should be left intact on import.

For example: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.2/additional-methods.min.js" integrity="sha512-6Uv+497AWTmj/6V14BsQioPrm3kgwmK9HYIyWP+vClykX52b0zrDGP7lajZoIY1nNlX4oQuh7zsGjmF7D0VZYA==" crossorigin="anonymous"></script>

gets converted to

<script src="/web_resources/themes/TestSite4/import/cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.2/additional-methods.min.js" integrity="sha512-6Uv+497AWTmj/6V14BsQioPrm3kgwmK9HYIyWP+vClykX52b0zrDGP7lajZoIY1nNlX4oQuh7zsGjmF7D0VZYA==" crossorigin="anonymous"></script>

To Reproduce

Steps to reproduce the behavior:

  1. Go to create site.
  2. Create site from url.
  3. Click next.

Expected behavior

External links to CSS and JS should be left intact on import.

Versions Affected

natechadwick commented 7 months ago

Re-opening as now no js files with relative path are being imported.

sonydeswal74 commented 7 months ago

Hi Nate,

You want me to fix it? I can as I know why it is happening.

natechadwick commented 7 months ago

Hi Santosh!

If you have time, and a fix, I definitely won't say no!

-n

natechadwick commented 6 months ago

Latest on this is that the CSS / JS Links are now "" when importing a Template from a URL. They are correct when a site is imported.

natechadwick commented 6 months ago

@ramdev1980 does that last PR resolve this?

ramdev1980 commented 6 months ago

@natechadwick This has been fixed.