-
Bug
-
Resolution: Fixed
-
Medium
-
4.8.0, 4.6.0, 4.8.1, 4.9.1, 4.13.1, 4.12.2, 4.13.11
-
39
-
Severity 3 - Minor
-
47
-
Issue Summary
Atlassian plugin vendor are extending SimpleUrlReadingCondition according to https://bitbucket.org/atlassian_tutorial/tutorial-licensed-conditions/src/master/src/main/java/com/example/plugins/conditions/IsPluginLicensedCondition.java. When using this condition to load a web-resource in the customerportal context, the wrong resource is loaded.
As a consequence:
- a lot of Service Desk portal URLs are corrupted since the string "customer/portal/undefined/servicedesk" is being mistakenly added to it, and accessing such URL returns a 404 error with the message "Oops, you've found a dead link".
- some functionalities from the customer portal will fail to work: for example, icon/avatar images might not be loaded on the customer, workflow transitions might fail on the customer portal, etc...
For example:
- Customer Portal Icons (Avatar):
- A normal icon URL should be like this:
<JIRA_BASE_URL>/servicedesk/customershim/secure/viewavatar?avatarType=SD_REQTYPE&avatarId=10610
- However, when the bug occurs, the URL is modified to the following invalid URL:
<JIRA_BASE_URL>/servicedesk/customer/undefined/servicedesk/customershim/secure/viewavatar?avatarType=SD_REQTYPE&avatarId=10610
- A normal icon URL should be like this:
- Customer Portal Transition
- A normal transition URL should be like this:
<JIRA_BASE_URL>/rest/servicedesk/1/customer/requests/transition
- However, when the bug occurs, the URL is modified to the following invalid URL:
<JIRA_BASE_URL>/servicedesk/customer/portal/37/undefined/rest/servicedesk/1/customer/requests/transition
- A normal transition URL should be like this:
Steps to Reproduce
- Create a test plugin that uses a condition to load resources on the customer portal (see screenshots/attachments)
atlassian-plugin.xml snippet
<web-resource key="test-true" name="test-true"> <resource type="download" name="condition-true.js" location="/js/condition-true.js"/> <context>customerportal</context> <condition class="com.atlassian.test.impl.TestCondition"/> </web-resource> <web-resource key="test-false" name="test-false"> <resource type="download" name="condition-false.js" location="/js/condition-false.js"/> <context>customerportal</context> <condition class="com.atlassian.test.impl.TestCondition" invert="true"/> </web-resource>
Expected Results
The resource associated with the TestCondition being true is loaded
Actual Results
The resource associated with the TestCondition being false is loaded
Workaround
Enable the feature flag sd.frontend.legacy.webresource.loading.customerportal.enabled:
- Go to Dark feature page (<baseURL>/secure/admin/SiteDarkFeatures!default.jspa)
- Add the following dark feature flag: sd.frontend.legacy.webresource.loading.customerportal.enabled
- is cloned by
-
JSMDC-5494 You do not have permission to view this issue
- is resolved by
-
JSMDC-7986 You do not have permission to view this issue
- mentioned in
-
Page Failed to load
-
Page Failed to load
-
Page Failed to load
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
Hi everyone, bc4ae08bb47a mma ab0a2b3627cc 817432d07859 d48a55e515a2 1b3662f488a9 8f5c9df38478 52e6fd720926 9264e510924d mfilipan c6804442ffa0 c7dfe7a6b4d2
I'm facing this issue again when create a test plugin with JSM 5.4.0. But my error requests are:
Does anyone have the solution for this bug? I tried the above workaround but it does not work in my case (adding the dark feature flag: sd.frontend.legacy.webresource.loading.customerportal.enabled)
Thanks and regards!