plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
255 stars 191 forks source link

Plone 5 external resources #2387

Closed rodfersou closed 1 year ago

rodfersou commented 6 years ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

Migrating an addon from Plone 4.3.x to Plone 5.1.x there is an external javascript associated with this addon, that should not be merged, just need to be referenced in the header:

//code.responsivevoice.org/1.4/responsivevoice.js

What I expect to happen:

In the header should be a script tag pointing to this resource.

<script type="text/javascript" src="//code.responsivevoice.org/1.4/responsivevoice.js"></script>

What actually happened:

This traceback pointing to this url http://localhost:8080/Plone///code.responsivevoice.org/1.5/responsivevoice.js

2018-04-20 10:01:58 ERROR plone.subrequest Error handling subrequest to http://localhost:8080/Plone///code.responsivevoice.org/1.5/responsivevoice.js
Traceback (most recent call last):
  File "/home/rodfersou/.projects/cache/eggs/plone.subrequest-1.8.5-py2.7.egg/plone/subrequest/__init__.py", line 146, in subrequest
    traversed = request.traverse(path)
  File "/home/rodfersou/.projects/cache/eggs/Zope2-2.13.27-py2.7.egg/ZPublisher/BaseRequest.py", line 525, in traverse
    return response.notFoundError(URL)
  File "/home/rodfersou/.projects/cache/eggs/Zope2-2.13.27-py2.7.egg/ZPublisher/HTTPResponse.py", line 718, in notFoundError
    "<p><b>Resource:</b> %s</p>" % escape(entry))
NotFound:   <h2>Site Error</h2>
  <p>An error was encountered while publishing this resource.
  </p>
  <p><strong>Resource not found</strong></p>

  Sorry, the requested resource does not exist.<p>Check the URL and try again.</p><p><b>Resource:</b> http://localhost:8080/Plone/code.responsivevoice.org</p>
  <hr noshade="noshade"/>

  <p>Troubleshooting Suggestions</p>

  <ul>
  <li>The URL may be incorrect.</li>
  <li>The parameters passed to this resource may be incorrect.</li>
  <li>A resource that this resource relies on may be
      encountering an error.</li>
  </ul>

  <p>For more detailed information about the error, please
  refer to the error log.
  </p>

  <p>If the error persists please contact the site maintainer.
  Thank you for your patience.
  </p>

What version of Plone/ Addons I am using:

Plone 5.1.x

hvelarde commented 6 years ago

you have to give more information: how are you registering the resource in Plone 5.1?

a failing test case should be nice.

jensens commented 1 year ago

I close the issue, because it addresses a Plone version that is no longer supported. If you think this is wrong please reopen the issue and assign a matching milestone.