How to turn off upgrade message in Umbraco backoffice - umbraco

Is it possible to turn off the Umbraco upgrade message in the Umbraco backoffice. Don't necessarily want my users to see this.

There is an umbracoVersionCheckPeriod key in appSettings section of the web.config that has the default value of 7. Set this to 0 to prevent "a new version is available" balloon.
<add key="umbracoVersionCheckPeriod" value="0" />
http://our.umbraco.org/wiki/reference/webconfig
EDIT:
For umbraco version 7 this key might not be present in the web.config by default but you can add it manually and the notification will disappear.
http://our.umbraco.org/documentation/Using-Umbraco/Config-files/webconfig7

for umbraco 8 add
add this key in appsettings section in the web.config
<add key="Umbraco.Core.VersionCheckPeriod" value="0" />
https://our.umbraco.com/forum/using-umbraco-and-getting-started/98912-how-to-disable-update-notification-backoffice

Umbraco 9 and Umbraco 10
Add VersionCheckPeriod to the appsettings.json.
{
"Umbraco": {
"CMS": {
"Global": {
"VersionCheckPeriod": 0
}
}
}
}
When this value is set above 0, the backoffice will check for a new version of Umbraco every 'x' number of days where 'x' is the value defined for this setting. Set this value to 0 to never check for a new version.
References:
https://our.umbraco.com/Documentation/Reference/Configuration/GlobalSettings/index-v9
https://our.umbraco.com/Documentation/Reference/Configuration-for-Umbraco-7-and-8/webconfig/
The code for the API controller is also here: https://github.com/umbraco/Umbraco-CMS/blob/e626fca2432582f052cb13654eedd9e60ef8723f/src/Umbraco.Web.BackOffice/Controllers/UpdateCheckController.cs#L47

Related

Page attribute value showing null in oracle webcenter sites 11g R1

Hi I am working in oracle webcenter Sites 11g.
I have added a new page attribute name pagetitle and added that in PageDefinition and add a new template with JSP logic and added the code:
<%=ics.GetVar("pagetitle")%>
but when viewing the page after creating a new page , the value of pagetitle is showing null.
You have to load the page asset first after read the required attributes.
Below is the sample code for display the 'pagetitle'
<assetset:setasset name="Page" type='<%=ics.GetVar("c")%>' id='<%=ics.GetVar("cid")%>' />
<assetset:getattributevalues name="Page" typename='PageAttribute' attribute='pagetitle' listvarname="pagetitlelist" />
<ics:listget fieldname="value" listname="pagetitlelist" output="title"/>
<%=ics.GetVar("title")%>
With this line in your JSP you can obtain all attibutes:
<ics:argument name="attributes" value="attribute1,attribute2,...,attributen" />
if want to use any attribute, do that.
For example: ${asset.attribute1}

valuechangelistener getting called multiple time

I'm working on icefaces upgrade from 1.8 to 3.3 as well as jsf from 1.2 to 2.0.
I have used this link as reference for icefaces upgrade
I'm using ice:datatable in which I have column of checkbox which is grouped for single worker.Check picture which is of before upgrade.
ISSUE 1:
Now Problem faced after migration is that the valuechangelistener of ice:selectbooleancheckbox works fine when I check then uncheck the checkbox of a single worker. But when I do following steps:
Check first worker (This updates the Assigned door column ).
Then check other worker . This unchecks the previous checked worker and also unchecks currently checked worker.
To analyse if there is any issue in phase I used balus C blog to check phase of icefaces when it hits valuechangelistner . Then I found on my second check 2 or more valuechangelistner are called one for previous worker other for current worker(Sometimes twice) this all happens in same invoke application phase.
ISSUE 2:
ValueChangeListener gets called even after Clicking "OK" button or "CANCEL".
Fixed it by adding f:param in ice:commandButton and checking for the param in valuechangelistener method.
Tried:
To change all ice tags in the page to ace tags(Related to datatable i.e datable ,row and column).
Result : Same issue with ace valuechangelistener as well as distorted style. Maybe because I could not find ice:rowHeader equivalent in ace tags and also much more.
Changed only checkbox column to ace:column. Valuechangelistener worked fine but issue with "groupOn" attribute so changed it to "groupBy" and condition="group" still may be it did not work because I used ice:datatable which doesn't support it.
Then I tried to implement groupOn functionality manually. Using rowspan and rendering single checkbox for single worker . But rowspan didn't work. Also when I tried to render checkbox, its style is not exactly same as I need. Check this hattp://postimg.org/image/ih2mgoh7d/ remove 'a' from 'hattp'.
<ace:column groupBy ="#{item.workerName} + #{item.workerId}" rowspan="2"
styleClass= "alignSBChbx" >
<ice:setEventPhase events="ValueChangeEvent"
phase="INVOKE_APPLICATION">
<ice:selectBooleanCheckbox id="dwaCheckbox" value="#{item.select}"
style=" width:'#{appViewSettings.checkboxSize}';
height:'#{appViewSettings.checkboxSize}';"
valueChangeListener="#{dockWorkerAssignmentBean.doorAssignmentChange}"
partialSubmit="true" immediate="true"
disabled="#{!empty dockWorkerAssignmentBean.errorMap['dockWorkersAssignmentPopup:assignmentErrorField']}"
rendered="#{item.visible}">
<f:attribute name="workerIdSelected" value="#{item.workerId}" />
<f:attribute name="assignmentIdSelected" value="#{item.assignmentId}" />
</ice:selectBooleanCheckbox>
</ice:setEventPhase>
</ace:column>
backend
public final void doorAssignmentChange(final ValueChangeEvent event) {
System.out.println("inside door Assignment...");
final String workerIdSelected = (String) event.getComponent().getAttributes().get(
"workerIdSelected");
// unrelevant code
}
}

Umbraco 4.11 MVC Mode - Children Url?

What is the correct way to obtain the URLs of children of the current node while using Umbraco 4.11 in MVC mode? This is what I tried and it keeps returning a blank URL:
#if (CurrentPage.Children().Count() > 0) {
<ul>
#foreach (var child in CurrentPage.Children()) {
<li>#child.Name</li>
}
</ul>
}
When that didn't work I resorted to the following:
#Umbraco.NiceUrl(child.Id)
This returns a URL, but it has .aspx extension on it. So my next hack is...
#Umbraco.NiceUrl(child.Id).Replace(".aspx", "")
That's not completely terrible, but I'm wondering if I'm missing something?
You need the NiceUrl() method to generate a valid Url.
To get rid of the .aspx extension, you need to set the setting "umbracoUseDirectoryUrls" to true in your web.config file:
<add key="umbracoUseDirectoryUrls" value="true" />
I can't add this as a comment, but there is a way to remove trailing slashes, in umbracoSettings.config:
<addTrailingSlash>true</addTrailingSlash>
Other way to get Only Node Name (Without .aspx) is
#Model.NodeById(#child.Id).urlName
But it will just give Node name without "/"

Using Microsoft.Reporting.WebForms.ReportViewer in a custom SharePoint WebPart

I have a requirement where I have to display some data (from a custom db) and let the user export it to an excel file.
I decided to use the ReportViewer control present in Microsoft.Reporting.WebForms.ReportViewer. I added the required assembly to the project references and I add the following code to test it out
protected override void CreateChildControls()
{
base.CreateChildControls();
objRV = new Microsoft.Reporting.WebForms.ReportViewer();
objRV.ID = "objRV";
this.Controls.Add(objRV);
}
The first error asked me to add this line in the web.config
which I did and the next error says
The type 'Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages, Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' does not implement IReportViewerMessages
Is it possible to use ReportViewer in my custom Web Part? I rather not bind a repeater and write my own export to excel code. I want to use something which is already built by Microsoft? Any ideas on what I can reuse?
Edit
I commented the following line
<add key="ReportViewerMessages"...
and now my code looks like this after I added a data source to it
protected override void CreateChildControls()
{
base.CreateChildControls();
objRV = new Microsoft.Reporting.WebForms.ReportViewer();
objRV.ID = "objRV";
objRV.Visible = true;
Microsoft.Reporting.WebForms.ReportDataSource datasource = new Microsoft.Reporting.WebForms.ReportDataSource("test", GroupM.Common.DB.GetAllClientCodes());
objRV.LocalReport.DataSources.Clear();
objRV.LocalReport.DataSources.Add(datasource);
objRV.LocalReport.Refresh();
this.Controls.Add(objRV);
}
but now I do not see any data on the page. I did check my db call and it does return a data table with 15 rows. Any ideas why I don't see anything on the page?
Are you running a report server under a SharePoint web app? Adding <remove key="ReportViewerMessages" /> to your web.config of the reporting site, or removing the <add key="ReportViewerMessages"... /> from your sharepoint web.config should clear it up. Not sure how that would impact the ootb reportviewer web part, though (test, test, test)...

Grails: checkbox not being set back to false

I am developing a Grails (1.0.4) app where I want to edit a collection of collections on a single page in a grid view. I got it to work quite well depending only on the indexed parameter handling of Spring MVC, except for one thing:
boolean (or, for that matter, Boolean) values in the grid can be set via checkbox, but not unset, i.e. when I check the checkbox and update, the value is set to true, but afterwards when I edit again, uncheck the checkbox and update, it remains true.
This is the GSP code of the checkbox:
<g:checkBox name="tage[${indexTag}].zuweisungen[${indexMitarb}].fixiert" value="${z.fixiert}" />
And this is the HTML that is generated:
<input type="hidden" name="tage[0].zuweisungen[0]._fixiert" />
<input type="checkbox" name="tage[0].zuweisungen[0].fixiert" checked="checked" id="tage[0].zuweisungen[0].fixiert" />
I've found a Grails bug that describes exactly this effect, but it's marked as fixed in 1.0.2, and the problem mechanism described there (underscore in hidden field name is put in the wrong place) is not present in my case.
Any ideas what could be the reason?
This is the solution a guy named Julius Huang proposed on the grails-user mailing list. It's reusable but relies on JavaScript to populate a hidden field with the "false" response for an unchecked checkbox that HTML unfortunately does not send.
I hack GSP to send "false" when
uncheck the box (true -> false) with
custom TagLib.
By default checkBox send nothing when
uncheck, so I use the checkBox as
event handler but send hidden field
instead.
"params" in Controller can handle
"false" -> "true" without any
modification. eg. Everything remain
same in Controller.
The Custom Tag Usage in GSP (sample usedfunc_F is "true"),
<jh:checkBox name="surveyList[${i}].usedfunc_F" value="${survey.usedfunc_F}"></jh:checkBox>
Here is what the Tag generate,
<input type="hidden" name="surveyList[#{i}].usedfunc_F" id="surveyList[#{i}].usedfunc_F" value="false" />
<input type="checkbox" onclick="jhtoggle('surveyList[#{i}].usedfunc_F')" checked="checked" />
The Javascript
<script type="text/javascript">
function jhtoggle(obj) {
var jht = document.getElementById(obj);
jht.value = (jht.value !='true' ? 'true' : 'false');
}
</script>
This is my own solution, basically a workaround that manually does what the grails data binding should be doing (but doesn't):
Map<String,String> checkboxes = params.findAll{def i = it.key.endsWith("._fixiert")} // all checkboxes
checkboxes.each{
String key = it.key.substring(0, it.key.indexOf("._fixiert"))
int tagIdx = Integer.parseInt(key.substring(key.indexOf('[')+1, key.indexOf(']')))
int zuwIdx = Integer.parseInt(key.substring(key.lastIndexOf('[')+1, key.lastIndexOf(']')))
if(params.get(key+".fixiert"))
{
dienstplanInstance.tage[tagIdx].zuweisungen[zuwIdx].fixiert = true
}
else
{
dienstplanInstance.tage[tagIdx].zuweisungen[zuwIdx].fixiert = false
}
}
Works, requires no change in grails itself, but isn't reusable (probably could be made so with some extra work).
I think that the simplest workaround would be to attach a debugger and see why Grails is failing to populate the value. Considering Grails is open source you'll be able to access the source code and once you figure out the solution for it you can patch your version.
I have also found this other bug GRAILS-2861 which mentions the issue related to binding to booleans (see Marc's comment in the thread). I guess that is exactly the problem you are describing.
I would create a small sample app that demonstrates the problem and attach it to the Grails bug (or create a new one). Someone here may be able to debug your sample app or you'll have shown the bug isn't really fixed.
Try this out, set the logs to DEBUG, frist try the first 3 if they don't show the problem up, flip them all to DEBUG:
codehaus.groovy.grails.web.servlet="error" // controllers
codehaus.groovy.grails.web.pages="error" // GSP
codehaus.groovy.grails.web.sitemesh="error" // layouts
codehaus.groovy.grails."web.mapping.filter"="error" // URL mapping
codehaus.groovy.grails."web.mapping"="error" // URL mapping
codehaus.groovy.grails.commons="info" // core / classloading
codehaus.groovy.grails.plugins="error" // plugins
codehaus.groovy.grails.orm.hibernate="error" // hibernate integration
This should allow you to see exactly when and how the parameters setting is failing and probably figure out a work around.

Resources