New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overriding OOTB webscripts and client side javascripts #255

Open
douglascrp opened this Issue Jan 22, 2015 · 9 comments

Comments

Projects
None yet
7 participants
@douglascrp
Contributor

douglascrp commented Jan 22, 2015

I'm trying to use alfresco-sdk 1.2-SNAPSHOT to make some changes on the OOTB workflow-details webscript.

I tried to edit
share-project/src/main/amp/config/alfresco/site-webscripts/org/alfresco/components/workflow/workflow-form.get.html.ftl
and
share/components/workflow/workflow-form.js

Refreshing the page http://localhost:8081/share/page/workflow-details?workflowId=activiti$18763&taskId=activiti$18805&referrer=tasks, I can't see any of my changes.

I also tried to use the web-extension path for my custom ftl file, but again, no changes hot-reload.
share-project/src/main/amp/config/alfresco/web-extension/site-webscripts/org/alfresco/components/workflow/workflow-form.get.html.ftl

I have followed the steps provided here http://ohej.dk/2014/09/alfresco-sdk-2-0-beta4/ to setup my project.

Am I doing something wrong?
Is it supposed to work for what I'm trying to do or only for new custom webscripts?

Let me know if you need more information in order to try to reproduce this issue.
But I think the idea is simple. Choose any OOTB webscript and try to override it.
Also choose a client side javascript and try to make changes on it, and check if those changes are hot-reloaded.

@ohej

This comment has been minimized.

Show comment
Hide comment
@ohej

ohej Jan 22, 2015

Collaborator

Did you restart or refresh web scripts after adding the new script?
New scripts are not picked up after refresh web scripts has been run. Does the changes get picked up when after this?

Collaborator

ohej commented Jan 22, 2015

Did you restart or refresh web scripts after adding the new script?
New scripts are not picked up after refresh web scripts has been run. Does the changes get picked up when after this?

@ohej ohej self-assigned this Jan 22, 2015

@douglascrp

This comment has been minimized.

Show comment
Hide comment
@douglascrp

douglascrp Jan 22, 2015

Contributor

Hey dude.
I'm not sure if I got your idea.
Your answer: New scripts are NOT picked up after refresh web scripts has been run.
Is the NOT right?
Should I refresh webscripts after I edit them on Eclipse?

Contributor

douglascrp commented Jan 22, 2015

Hey dude.
I'm not sure if I got your idea.
Your answer: New scripts are NOT picked up after refresh web scripts has been run.
Is the NOT right?
Should I refresh webscripts after I edit them on Eclipse?

@lightoze

This comment has been minimized.

Show comment
Hide comment
@lightoze

lightoze Feb 11, 2015

The issue happens in RAD mode (-Prun), when maven.alfresco.includeWebResources=false. In this case OOTB resources and classes have higher priority than ones from AMP and any overrides are not visible at all (even after full restart).
My SDK version is 2.0.0

lightoze commented Feb 11, 2015

The issue happens in RAD mode (-Prun), when maven.alfresco.includeWebResources=false. In this case OOTB resources and classes have higher priority than ones from AMP and any overrides are not visible at all (even after full restart).
My SDK version is 2.0.0

@lightoze

This comment has been minimized.

Show comment
Hide comment
@lightoze

lightoze Feb 11, 2015

Another note: it seems to be impossible to override resources from docBase in Tomcat 7, however it's possible in Tomcat 8 using PreResources. Unfortunately tomcat8-maven-plugin (https://github.com/apache/tomcat-maven-plugin/tree/tc8.x) is currently WIP.

lightoze commented Feb 11, 2015

Another note: it seems to be impossible to override resources from docBase in Tomcat 7, however it's possible in Tomcat 8 using PreResources. Unfortunately tomcat8-maven-plugin (https://github.com/apache/tomcat-maven-plugin/tree/tc8.x) is currently WIP.

@Sheldor5

This comment has been minimized.

Show comment
Hide comment
@Sheldor5

Sheldor5 Aug 7, 2015

Any workarounds?

Sheldor5 commented Aug 7, 2015

Any workarounds?

@DarkStar1

This comment has been minimized.

Show comment
Hide comment
@DarkStar1

DarkStar1 Oct 11, 2017

This is still an issue as of SDK 3.0.1. The workaround so far is to provide both the original and minified files for the overridden ootb component.

DarkStar1 commented Oct 11, 2017

This is still an issue as of SDK 3.0.1. The workaround so far is to provide both the original and minified files for the overridden ootb component.

@douglascrp

This comment has been minimized.

Show comment
Hide comment
@douglascrp

douglascrp Oct 23, 2017

Contributor

@DarkStar1 Hello.
Please, check this one #423

Contributor

douglascrp commented Oct 23, 2017

@DarkStar1 Hello.
Please, check this one #423

@rastoh

This comment has been minimized.

Show comment
Hide comment
@rastoh

rastoh Oct 23, 2017

Hey,

I am also facing a similar issue with the SDK 3.0.1. I am trying to override the users.js client side javascript file and have placed the overridden file under share-project/src/main/assembly/components/console/users.js in my project but it is not getting picked up.

Though I am able to access the same from share-project/src/main/resources/META-INF/components/console/users.js.

Please let me know what I am doing wrong and what is the solution.

rastoh commented Oct 23, 2017

Hey,

I am also facing a similar issue with the SDK 3.0.1. I am trying to override the users.js client side javascript file and have placed the overridden file under share-project/src/main/assembly/components/console/users.js in my project but it is not getting picked up.

Though I am able to access the same from share-project/src/main/resources/META-INF/components/console/users.js.

Please let me know what I am doing wrong and what is the solution.

@douglascrp

This comment has been minimized.

Show comment
Hide comment
Contributor

douglascrp commented Nov 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment