I had migrated a SharePoint 2010 web application to SharePoint 2013 and running in compatible mode.
i have a SharePoint designer modified master-page which is saved in content database. i had some inline codes running in master-page.
the master page was working fine in SharePoint 2010.
i had this line added in page parser
<PageParserPath VirtualPath="/_catalogs/masterpage/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />
but in 2013 I still have the same line but it still gives me this error
An error occurred during the processing of /_catalogs/masterpage/custom.master. Code blocks are not allowed in this file.
when i change the entry in page parser to this it works fine
<PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />
which is not a good way as it opens all my pages to allow scripting.
any idea what is the change in 2013 and what is the best way to achieve this in 2013
here's my code:
<PageParserPath VirtualPath="~/_catalogs/masterpage/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />
And it works fine on my end.
i got it to work in 2013 by setting the virtualpath to "~/_catalogs/masterpage/*"
Did you modify the master page in SharePoint 2010, or only in 2013?
This page: http://blog.bullseyeconsulting.com/archive/2013/03/21/fixing-code-blocks-not-allowed.aspx
Quoting:
As soon as it is "customized" (formerly known as "unghosted"), the reference to [the master page] for that site is in the database, not the file system. Without a change to web.config, code blocks are not allowed and the page breaks.
Related
I have a custom field type that was built for SharePoint 2010 that I have installed on SharePoint 2013 Foundation. The wsp installed perfectly and I get all the same functionality.
The one problem I am having is how the information is displayed in the list view. I am inheriting an SPFieldLookup and am not doing anything to override how this is displayed in the list view.
On SharePoint 2010 it renders perfectly as a hyperlink to the item which opens the standard pop out window on click etc. On SharePoint 2013 Foundation however the html doesn't render properly at all- it is almost as though it is displaying as plain text.
SharePoint 2010:
SharePoint 2013 Foundation:
My question is how can I get the lookup value to render properly on SharePoint 2013?
The same version of the wsp in installed on both machines.
Unsure as to whether this was simply a browser or client side issue I added a standard lookup field to the list and it renders fine!
I had the same issue with my codeplex project which is based on Lookup field. I added a link to dummy JS file and overrode the JSLink property of the field class. I have blogged about it here: http://sharepointnadeem.blogspot.in/2013/12/sharepoint-2013-upgrade-sharepoint-2010.html
In SP 2013 by default field rendering is done on client side. Concept of JSLink has been introduced if you want to change the look and feel of field.
However by ClientRender=False in new form url you can force it to server render mode.
So after an afternoon of head scratching it turns out that this is not a deployment issue. It probably didn't even warrant a question but for anyone who has the same problem as me...
If you edit the page and modify the listview settings you will see that there is a new setting called "Server Render".
I guess this ultimately gives you more control but in may case it prevented my fields from rendering as expected- turning this on meant my custom fields we once again displayed 'normally'.
I am migrating MOSS 2007 portal to sharepoint 2010 without UI upgrade. In MOSS 2007 on feedback form submission "OK" button it redirects to home page. After I migrated to 2010 after the feedback submission it redirects to "sitename/lists/Feedback" and hence throws page not found error. In 2007 I checked all aspx pages related to feedback, no javascript is written, it is all OOTB. I am not understanding what was done in 2007 for this redirection. Also in addition no views are present in view section. But AllItems.aspx exists and i have a navigation link for the same. Please if any1 can guide me in how do i solve this problem in 2010.
I am not sure if below technique that I used is recomended but this solved my problem. My Feedback link was menioned in footer in my master page and I appended ?Source=default.aspx in the href of the anchor tag.
e.g.
<a href=/Lists/Feedback/Allitems.aspx?Source=default.aspx>
I've got a custom webpart in Sharepoint 2007 that works when used on the same machine sharepoint is installed on. When I browse to the page from a remote machine, the webpart renders but when you click the submit button, I get redirected to /_layouts/login.aspx?ReturnUrl=
Does anyone have any idea what is happening, or what I should do?
You can view the setting to enable annymous access here:
http://office.microsoft.com/en-us/windows-sharepoint-services-help/enable-anonymous-access-HA010113018.aspx
I have seen many posts about people migrating Master Pages from 2007 to 2010 but I'm more interested in knowing more about problems faced at development level. I am planning to migration Master pages for publishing sites to SharePoint 2010.
Any help will be appreciated.
Your best option is probably to edit the 2010 master page to look like your custom master page rather than trying to modify the existing custom code - customisations tend to be simpler than the SharePoint page structure and easily pasted into the new master page.
How hard it will be depends on how closely your design matches the default SharePoint page structure - getting the ribbon to work within a fixed width layout takes far more work than it should.
There is MSDN article on this topic:
Upgrading an Existing Master Page to the SharePoint Foundation Master Page
http://msdn.microsoft.com/en-us/library/ee539981(office.14).aspx
If the master page that is to be updated was designed using the Microsoft supported customizations, then there should be no problem in upgrading the master page.
I have a custom feature which adds a few controls into the AdditionalPageHead DelegateControl. This works fine on any sites which use our default.master. However the project requires the use of a publishing site which has a master page derived from BlackBand.master (which does not have the AdditionalPageHead DelegateControl included), so I made a copy of the master page from the master page gallery on the appropriate site collection and then modified it to include the following line:
<SharePoint:DelegateControl
ID="DelegateControl1"
runat="server"
ControlId="AdditionalPageHead"
AllowMultipleControls="true"/>
This should therefore include this DelegateControl within all pages using this master page. However when this is uploaded as a new version of BlackBand.master and approved as such, all the pages in the site that use it get a 404 error as if they no longer exist. If I restore the previous version of the master page then everything return to normal.
Help is appreciated as always.
The answer was that I was approaching the solution to my problem incorrectly.
To fix this I opened SharePoint designer at my site collection root and clicked on _catalogs/masterpage. Then I made a copy of BlackBand.master in the masterpage catalog. Opened it and added my line of code. Saved it and then set it as my default and custom master page (to ensure that it applied to any straight up web part pages as well as layout pages).
This worked without a problem.