cancel
Showing results for 
Search instead for 
Did you mean: 

setContextPath no longer works with absurl

steve_tekell
Champ in-the-making
Champ in-the-making
a change to setContextPath in v3 (3Stable/Final)
breaks this

<script> setContextPath('${absurl(url.context)}'); </script>

the context path will get set to "" and Ajax won't work.
the workaround I found was to set _alfContextPath directly

<script> _alfContextPath = '${absurl(url.context)}'; </script>

I needed to use absurl to get the node summary panel to work in external applications in some environments,  e.g., localhost:8081.
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
Thanks for the heads-up Steve.

If you get a chance (and haven't already), could you raise the issue in JIRA please?

Many thanks,
Mike

steve_tekell
Champ in-the-making
Champ in-the-making
ok
https://issues.alfresco.com/jira/browse/ALFCOM-2544

but I realized, it's not absurl
it's any setContextPath in an external app
so if /myapp and /alfresco are running on the same server
setContextPath('/alfresco') no longer works from within /myapp
and you need to set _alfContextPath

Actually the method seems like it was changed just make this setContextPath fail in such a case.
I don't know the reasoning.  I do know it was non-trivial to get node summary panel working outside alfresco in the first place.  Maybe there's a better alternative now.

Thanks for the heads-up Steve.

If you get a chance (and haven't already), could you raise the issue in JIRA please?

Many thanks,
Mike
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.