Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

rewrite.xqy does not correctly handle static files on MarkLogic 8.0 #654

Closed
rhdunn opened this issue Aug 31, 2016 · 4 comments
Closed

rewrite.xqy does not correctly handle static files on MarkLogic 8.0 #654

rhdunn opened this issue Aug 31, 2016 · 4 comments

Comments

@rhdunn
Copy link

rhdunn commented Aug 31, 2016

Using 8.0-4.2, navigate to the /test/ path. This loads the CSS, images, etc. for the test page (e.g. /test/img/warning.png). On my MarkLogic install, this generates:

XDMP-UNDFUN: (err:XPST0017) Undefined function conf:rewrite()

for each of the content items, so the page loads, but the associated CSS, images and JavaScript do not. This is from:

import module namespace conf = "http://marklogic.com/rest-api/endpoints/config"
  at "/MarkLogic/rest-api/endpoints/config.xqy";

in the xdmp:eval fallback to req:rewrite not returning a rewritten URI.

Handling this error in rewrite.xqy to return $uri fixes the problem.

rhdunn pushed a commit to rhdunn/roxy that referenced this issue Aug 31, 2016
@RobertSzkutak
Copy link
Contributor

RobertSzkutak commented Aug 31, 2016

I'm having trouble reproducing this. I grabbed a fresh copy of the dev branch, bootstrapped and deployed, navigated to /test/ and the page appeared to load just fine. I also looked in Errorlog.txt but can't find the message you're seeing. Is there another step I might be missing?

@RobertSzkutak RobertSzkutak self-assigned this Aug 31, 2016
@RobertSzkutak
Copy link
Contributor

I forgot to mention that this error message : XDMP-UNDFUN: (err:XPST0017) Undefined function conf:rewrite() suggests to me that you may not have this fix from the dev-branch in your code : #588

@grtjn
Copy link
Contributor

grtjn commented Aug 31, 2016

The rewrite issues only occur in 8.0-2 or later if i am not mistaken..

Sent from Samsung Mobile

-------- Oorspronkelijk bericht --------
Van: Robert Szkutak notifications@github.com
Datum: 31-08-2016 14:18 (GMT+01:00)
Aan: marklogic/roxy roxy@noreply.github.com
Onderwerp: Re: [marklogic/roxy] rewrite.xqy does not correctly handle static files on MarkLogic 8.0 (#654)

I'm having trouble reproducing this. I grabbed a fresh copy of the dev branch, bootstrapped and deployed, navigated to /test/ and the page appeared to load just fine. Is there another step I might be missing?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@rhdunn
Copy link
Author

rhdunn commented Aug 31, 2016

@RobertSzkutak This is fixed in #416. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants