Final Layout being wiped out when editing text field in Sitecore 8.1 - sitecore

I have a strange issue whereby when I edit a rich text field in the experience editor and save the page, it takes me to the layout not found page.
When switching back to the content editor, I can see that final layout has been completely wiped (the shared remains intact). I've noticed that if I change to the shared layout within the experience editor (via the presentation tab) and perform the same edit - it works fine.
What would cause the final layout to be wiped?

I've noticed that this can be caused by having Final Renderings set on a template's standard values. Currently I can't think of a reason to do this but I can see how it's very easy to accidentally edit a standard values item in the experience editor in the wrong mode.
It's easy to reset presentation details back to standard values in Sitecore, but to my knowledge you can't reset just the final renderings. To avoid having to go through each failing template and manually reset and re-add all the added renderings I've found an easy way to fix it if you have TDS (or similar) installed.
Search for __Final in the /Sitecore/templates folder in the file system.
Delete all the instances of this __Final Renderings field (From the '----field----' line until the next one).
Sync with Sitecore.
Not really a fix to the issue, but when I had to fix >20 templates where this was happening it saved me a lot of time and thought it was worth a share.

Related

Sitecore add here button not showing the Add rendering dialog

All of a sudden the Add here button in experience editor to add a rendering is not working. When clicked nothing happens. Do you have any idea where can I start look into? I already tried to remove the custom styles and scripts in my Editing theme. Sitecore version is 9 update 2 and SXA is 1.7
You have started from the right thing. Please make sure that you have the valid base themes defined in the Media Library: /sitecore/Media Library/Base Themes, especially, the Editing Theme with the logic used to edit components in Experience Editor.
Another idea is to check the order in which the layers load in Sitecore. The default order is defined in Website/App_Config/layers.config, make sure that SXA configuration loads last in the Modules layer, so that all custom modules are processed ahead of the SXA. It is recommended to create a custom patch file instead of modifying the standard configuration.
Hope this helps.
Did you check the console?
Maybe you have some error caused by some new custom script and that's preventing the add button to work
We had this issue for a specific set of placeholders, fortunately affecting only a single project in our solution. To fix the behavior, we had to manually set "editable" to false -> save item and then back to true -> save item for every affected placeholder.
[EDIT]
We finally found the culprit, it was related to a Sitecore bug documented here: https://kb.sitecore.net/articles/706490
Setting the value for Query.MaxSize from 100 to 400 permanently fixed the issue

Sitecore doesn't render any field types anymore

After a deploy to our Acceptance environment, templates in sitecore seem to be broken. We have installed them back with an item package from a working environment and did a revert on the /sitecore/templates/system tree.
We didn't notice any difficulties here, but when we try to edit with a rich text editor, we see the raw values. Even a tree list is rendered as a single line text field.
Next to that, the /sitecore/templates/system/templates/template item does not contain any fields.
Since we are on an acceptance environment, we cannot revert the entire database in case of data loss.
Do not think I entirely understand your issue, can you please be more specific and give us more details? You say templates are broken, but in what way exactly?Can you try reproducing that to ensure it happens again?
If you see everything as a text value, that happens because of you have Raw values in View tab switch on.

How to better manage versions in Sitecore Page Editor

The way that Page Editor handles versions has been causing issues for in one of our Sitecore solutions for a client. I've posted about them here:
Sitecore instance showing incorrect workflow state in Page Editor
Expected usage of Page Editor's Experience date
I didn't get much response on those and so far I've surmised that this is just how Sitecore works. This is less than ideal for our instance, as when publishing restrictions are set, authors don't know which version they're editing which is causing various issues for them.
I'd like to implement a solution(s) to improve the experience provide the following functionality:
Something in the Experience tab that shows the number of the version being viewed.
A button on the Experience tab that resets the Date to the default (this is not simply setting the date to the current date/time, but resetting it to act as it did before a date was manually set).
A custom button in Content Editor which allows an author to open a specific version in Page Editor...set the date automatically when it opens, I guess.
An any one give me some clues on how much of this is possible and where to start?
Thanks.
For the first bullet "Something in the Experience tab that shows the number of the version being viewed", you can add version item in Core database.
Move to "Core" DB in Desktop Mode
Navigate to "/sitecore/content/Applications/WebEdit/Ribbons/WebEdit/Experience/"
Create "Versions" item like this, http://imgur.com/bPEDm7R
Create "Compare" item under "Versions" like this, http://imgur.com/dG8dz2M
The result like this, http://imgur.com/HPu3XAL
The content author can see which version they are using and they can also compare with previous versions.

Sitecore Broken Links and Content Editor Issues

We've been noticing an increase in number of broken links on our sitecore website.
Some it is due to
User Training
Publishing Issues (linked page is not yet published)
Maybe content editor issues
It's been hard to verify some of these but sometimes the link might have the authoring page URL (which means someone didn't follow the SOP), sometimes they have a strange url like /shell/Content Editor/...
So we are trying to proactively fix these before the pages go live.
I had a couple ideas like writing a Handler that would look through all "Rich Text Fields" and looking for inconsistencies (like authoring server URL). Also using a crawler-type of validator could help us (http://home.snafu.de/tilman/xenulink.html#Description) but we were wondering what the community was doing to address this issue.
The "internal link checker" usually works well but doesn't detect many of this erroneous setups (as I believe it sees them as 'external links').
Your input is greatly appreciated!
If you have RichText fields and create internal links, your internal link looks like this in the HTML view: "a href="~/link.aspx?_id=EB3AD128E7BF4F3C9F3812F701D7724E&_z=z" and when you hover with your mouse over it, is show "/Sitecore/Shell/Controls/Rich Text Editor/" before the ~/link.aspx. This is normal behavior. This link is modified to a normal link during rendering of the RTE field.
However, be sure to use the Sitecore controls like to render these RTE fields and to render links. Also using sc:fld() in XSLT instead of sc:field() can create strange links because sc:fld is rendering the raw value of the field.
In all of the Sitecore projects I have been working on, I didn't have much issues with broken links.
There is a known bug with copy-pasting links from a rich text editor, where path info is appended to the link (generating the /shell/Content Editor/ stuff).
Sitecore have a fix for it here:
http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/KnownIssues%20Recommended/Copying%20and%20pasting%20link%20in%20rt%20fields%20may%20break%20the%20link.aspx
I would suggest a new Validation Action added to the workflow command before the items are finalized. Then you could actively stop them from being published and give immediate feedback. If you're not using workflows, you could add a new item level validator, but those often get ignored in my experience -- too many false positives on the existing validators.

Sitecore 6: Duplicate controls appearing on device layout

Background:
We have a sitecore 6 installation with a bit of custom code to detect devices (and origins), and switch to a different (custom) device definition in sitecore. This has the effect of changing templates, and controls where appropriate.
This all works fine.
However.
When we select a node in the content tree, go to the Presentation Tab, click Details to get the Layout Details windows, then edit a device item to add controls we see that duplicates are being added to the devices - not just the one we are editing either. It seems to "double up" what is there - but it never changes the "Default" layout.
I have checked the usual suspects (i.e. all connection strings are correct, pointing to the right databases) but I still get duplicates on saving. The duplicate does not appear on edit - but save - it seems.
Any suggestions on how to track this down, as its causing a nightmare for us.
Sitecore Version : 6.4.1 (rev:110324)
Andy
This is a known issue that can be solved by specifying a layout (Mobile Layout and Main Layout, in your case) on the standard values of your template.