[MAGNOLIA-1018] JavascriptIncludePage doesn't respect classpath when loading javascript class definitions. Created: 28/Aug/06 Updated: 04/Nov/15 Resolved: 04/Nov/15 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Chris Miner | Assignee: | Philipp Bärfuss |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0.25h | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | 0.25h | ||
| Environment: |
irrelevant |
||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
If you include two defnintions of a javascript class in your classpath then the JavascriptIncludePage will prefer the last definition in the path. This is not expected since it isn't the way it works with java classes. The first definition found should be preferred. Here's a patch to the renderHtml method: Index: /home/chris/Documents/magnolia-all/magnolia-module-admininterface/src/main/java/info/magnolia/module/admininterface/pages/JavascriptIncludePage.java for (int j = 0; j < files.length; j++) {
// write first the runtime |
| Comments |
| Comment by Chris Miner [ 29/Aug/06 ] |
|
It could be said that the current solution matches expectations wrt javascript that being that functions defined later replace those defined earlier. Although, as a practical issue it is nice to be able to override class definitions for java as well as the javascript in the same way. Which is to say move the jar up in the class path. |
| Comment by Michael Mühlebach [ 04/Nov/15 ] |
|
Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes. |