Can not create Confluence page, any idea why? - jira

When creating an empty page in Confluence, wheel keeps spinning, I see following error in browser. Do you have any idea what is wrong?
TypeError: e.replace is not a function. (In 'e.replace(n,"⌘")', 'e.replace' is undefined)

Related

Create a metric in workspace for the rate at which any page is the previous page to a specific page?

Our site has several error page including a catch-all error page for errors that we cannot identify. I am trying to create a metric in workspace that will give me the rate at which any page is the previous page to the catch-all error page.
This is what I tried (not working):
((page=catch-all AND previous page exists)[Unique visitors])/(Page exists[Unique Visitors]
It gives me 99% on the error page itself and 0% for every other page.
I previously had another formula working correctly for specified pages like this:
((page=catch-all AND previous page=specific page)[Unique visitors])/(page=specific page[Unique Visitors]
This would give the error rate of a specific page. How do I create a metric that can sub in any page in workspace?
The easiest way to obtain this data is to fire a custom event whenever an error message is shown. From there, you can calculate error rate by taking the total number of errors and dividing it by the total number of page views for each given page.

Umbraco 404 Issue

I have setup 404 redirection successfully for an umbraco project. If the user navigates to a page that doesn't exist it shows the designated node id.
However consider this:
http://tsw/course-calendar/ - Correct Link
http://tsw/coursecalendar/ - Doesn't 404 (but should)
http://tsw/coursecalenda/ - 404 redirects
In the example above the correct link as per umbraco is the second however if I remove the dash but leave the words I get a Server error:
The model item passed into the dictionary is of type 'Castle.Proxies.HomepageDTProxy', but this dictionary requires a model item of type 'TSW.Web.ViewModels.CourseCalendarVM'.
It's like the page is trying to resolve the URL.
How do I stop this behaviour in Umbraco so that only full and accurate links are opened and the remaining are 404 redirected?
Do you have a doctype or template named coursecalendar? Then that might be it. If so, there are options to disable the URL resolving, see https://our.umbraco.com/forum/templates-partial-views-and-macros/ . The "switch" is disableAlternativeTemplates in umbracoSettings.config

Capybara test intermittently failing when using Selenium driver

I've got an integration test here which is passing flawlessly using the poltergeist driver every time, but when I run this test using Selenium it passes on average 3 times and fails 1 time.
def fill_in_inclusion_criteria
find("div.measure#age label[for='16']").click
find("div.measure#substance_use_met label[for='1']").click
find("div.measure#participant_consent label[for='1']").click
click_link("Next")
end
When it fails, the error that I get back is this
expected to find css "div.measure#participant_consent" but there were no matches. Also found "", which matched the selector but not all filters.
The participant consent button appears when div.measure#age label[for='16'] is clicked, so it's dependent on Javascript. I see this happening in Firefox most of the time, but when it errors, the div isn't visible on the page.
It seems like it's not waiting for the element to display on the page before clicking it, but I thought that wrapping it in a "find" waits for the element to be visible on the page before trying to click it?
Any idea why this could be happening?
The one confusing thing with your question is that the error message you posted isn't actually for the code you've shown, since if it was the error message would be expected to find css "div.measure#participant_consent label[for='1']" ... . Assuming that's just a copy paste error/from a previous slightly different version of the code and the line you specified is where the error is actually coming from:
Since the previous find/click lines are working there are 2 potential reasons for the third one to not find the label element
The age label[for='16'] element click either isn't actually occurring, or is occurring before the JS that enables the showing behavior is attached. You can check for this by adding a sleep for a few seconds before it and seeing whether the failures go away
The participant_consent find/click isn't waiting long enough for the element to appear. find waits up to Capybara.default_max_wait_time seconds for elements to appear, so if that is long enough you could increase that setting, or pass a :wait option to find to override the setting for that call
find("div.measure#participant_consent label[for='1']", wait: 10).click
Technically, there is a third potential cause but it's highly unlikely due to the sporadic nature of the failure, which would be a JS failure on the page. You can check for this by rescuing the error and pausing your test so that you can look at the developer console in the browser for any errors.

Oracle Forms - Display message blocks rest of the code execution or message doesn't show

I'm trying to show a message on a form without success.
What I'm doing is: When a new line is clicked, I use the WHEN-NEW-RECORD-INSTANCE to do some verifications and some enabling/disabling on the form and showing up the message. The problem is sometimes it does the enabling/disabling but not the message, then I click another line and it shows the previous message but doesn't do the enabling/disabling...
I've already tried some stuff like:
message('message');
n := Show_alert('message');
with and without SYNCHRONIZE;
I don't think it's the code itself blocking the messages... or I'm missing something...
Does anyone ever had this problem?
Can someone tell me the various options to display messages and their differences?
Thanks.
I managed to fix this using the WHEN-MOUSE-CLICK trigger instead.
I didn't want to use this at first because when I clicked the already selected line it would show the message again but I made some code verification and fixed it.
Someone can close this.
thanks.

(Ruby, Rails, AJAX) TemplateError for second-level partial during AJAX update

Could someone please explain to me why I'm getting an ActionView::TemplateError when I try to use AJAX to update the interface while using the following code:
CODE
I have the following structure: Site -> Building -> Control. Each loops through it's collection of items and renders a partial for each. From Site to Building works just fine. However, going from Building on to Control throws the template error.
It is noteworthy that Controls get added just fine, and if I refresh the page, all the code works -- but for some reason when I try to do the AJAX thing, the partial (not the "rjs" file) throws an error.
Any thoughts? My apologies if this is too vague.
Best.
EDIT -- The error is as follows:
TEMPLATE ERROR
Let's deconstruct the error you get:
ActionView::TemplateError (undefined method `controls' for #) on line #21 of app/views/site_manager/_building.html.erb
The first part ActionView::TemplateError is just the type of exception raised and not really interesting in this case. The next part is, however:
undefined method `controls' for #<Control:0x21f61f0>
This basically tells you that you're trying to call a method called controls on an object that's an instance of the Control model. It also tells you that the controls method is not defined on that instance.
on line #21 of app/views/site_manager/_building.html.erb
The above tells you where to find the source of this error, namely line 21 in the site_manager/building partial. That line looks like:
<%for control in building.controls%>
In that line you're trying to call a controls method on a variable, which is what isn't working according to the error message; the controls method is undefined on that variable. The error message also told you that the variable contains an instance of your Control model.
Now, you've named the variable building, but it contains an instance of Control, which leads me to believe that you've somehow put another value into the building variable than you intended.
Unfortunately, you don't show the code that assigns the value to the building variable, so I can't get any closer to a real answer for you. Hopefully the above is enough to lead you to a solution.

Resources