Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confluence 5.7.x and AngularJS

Aviram Gabay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 25, 2015

Hi,

I've noticed that since the upgrade to confluence 5.7.x pages that load angular application started throwing an error at the form of "s.hasAttribute is not a function"

I've done some digging and found out that the error is thrown by a framework called skateJS and its used in the latest version of AUI that is bundled with this version of Confluence.

Does anyone else experience this issue? Can you suggest a workaround?

Thanks!!

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Aviram Gabay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2015

After speaking with the Atlassian guys in the last camp, it appears that skateJS bundled with AUI plugin is responsible for the issue and will be fixed the AUI version that will come bundled with Confluence 5.9

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2015

You say "pages that load angular application "?  What application is this?  Is there a specific place this happens?  (As I can't replicate it here)

Aviram Gabay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 25, 2015

Hi Nic, Im referring to custom applications created by our team, embedded via a custome Confluence plugin and user macros. This happens in all pages that contains angular apps, this happens with multiple angular apps. To recreate it make sure you are running Confluence 5.7.3 and that the AUI plugin version installed in the instance is also 5.7.3. By the way, by looking at the latest version of SkateJS it looks like they referred to this issue and fixed it. The problem is AUI isn't running the latest of skateJS Does this help? Cheers,

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2015

So, there's actually nothing wrong with Confluence, and it's your applications and plugin(s) that are failing. You'll need to debug your applications to work out why they're going wrong.

Aviram Gabay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 25, 2015

My applications fail because they conflict with the embedded version of skateJS in AUI. Also, latest version of skateJS fixes the issue. Are you running angular applications that do'nt run into this issue?

Aviram Gabay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 25, 2015

after doing some further digging it seems that one of the causes to this issue is ng-if. If I replace it with ng-show there are no errors. So I don't think it qualifies under the my plugins are failing category. Did you encounter anything similar?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2015

No. That's my point - Confluence is working fine. It's your code that is the problem. That problem could be that your code is buggy, but I suspect it's far more likely to be that your code is relying on different versions of libraries that Confluence is built with and it's running into issues with those libraries that are not a problem for Confluence. If that is true, you've got three options - make your code work with the libraries Confluence ships with - provide the libraries along with your code and isolated from Confluence somehow (I'm not sure this is even possible) - replace the libraries in Confluence (not recommended as it may break Confluence, you cannot be supported on it and it'll be a nightmare to maintain and upgrade)

Aviram Gabay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 25, 2015

How is it that my code is buggy? I don't mind sharing the code with you if you want to take a look, but ng-if is a core functionality with Angular. Don't you agree that a better explanation Confluence doesn't officially support angular applications and that causes the issue?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2015

You are not quite understanding what I'm getting at. Your code *might* have bugs, but it might just be about the libraries. "Buggy" is not quite the point here, the point is that YOUR code does not work, but Confluence does. So there's nothing wrong with Confluence, it's your code that is causing an issue. The best option is for you to fix or work around whatever the problem is in your code, (even if it is not a bug, but that Confluence doesn't support it)

pelizza
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2016

Hey guys,

I write applications for JIRA using AngularJS too. I found an issue on Skate's Github page for an outdated version of SkateJS which shows a conflicts with html comment nodes. As AngularJS adds comment nodes on many places (before ng-if, for example) it conflicts with this version of SkateJS.

I have opened a ticket for the Atlassian guys which pointed me to that. Now that Skate is already updated on latest JIRA versions, this error went gone.

TAGS
AUG Leaders

Atlassian Community Events