I've just taken over administration of a site built on the Umbraco framework and I'm experiencing a couple of bugs. I've searched the forum and documents, but can't find an answer. Unfortunately the problem may be totally unrelated to the framework - I just can't tell at this early stage.
A news item using a Newspage template is reproduced by automatically-generated content on the front page: the news item on the first page is truncated, together with a link to the news story on the News page. So far so good - the truncation and links work fine.
The problem is that word-spacing gets randomly messed-up: spaces between words on the News page are lost on the shortened version on the frontpage, so two words unexpectedly sit together 'likethis'.
I've tried inserting unicode or spaces in the HTML view of the page editor, but the changes don't stick - the CMS just removes the markup when I save the revised version. I've also tried to see where the homepage content is auto-generated within the templating section, but I can't find this method.
Any ideas what's happening when the shortened version of a News item is being generated?
First of all it should not at all be neccesary to insert unicode etc. in the rich text editor to make the text look good on the website. Stripping of HTML is enabled in this particular Umbraco version by default btw.
Do you have any clue about how the news listing is being rendered? Is it a xslt file or some razor that is being used? If you know or can figure out what file is being used it would be good to post it in here since it will be easier to figure out what might be the issue.
Sorry for the delay in replying, there are quite a few new tasks involved in the company takeover of which the website is just one part :-/
I've looked through all of the sections in the UI and especially the Developer tools, and the only file that seems to relate to this output is this (hope the forum will render inline code?):
Well it seems to be the correct file - but I don¨t know if perhaps there are some more being used to render the "pagecontent" field. Have you also checked the templates to see if the field is being rendered directly in that one?
The above file looks fine in regards to the described issue in your initial post - this is not where the problem is it seems.
Word-spacing problem in generated content
umbraco v 4.7.2
I've just taken over administration of a site built on the Umbraco framework and I'm experiencing a couple of bugs. I've searched the forum and documents, but can't find an answer. Unfortunately the problem may be totally unrelated to the framework - I just can't tell at this early stage.
A news item using a Newspage template is reproduced by automatically-generated content on the front page: the news item on the first page is truncated, together with a link to the news story on the News page. So far so good - the truncation and links work fine.
The problem is that word-spacing gets randomly messed-up: spaces between words on the News page are lost on the shortened version on the frontpage, so two words unexpectedly sit together 'likethis'.
I've tried inserting unicode or spaces in the HTML view of the page editor, but the changes don't stick - the CMS just removes the markup when I save the revised version. I've also tried to see where the homepage content is auto-generated within the templating section, but I can't find this method.
Any ideas what's happening when the shortened version of a News item is being generated?
Hi Mani and welcome to our :)
First of all it should not at all be neccesary to insert unicode etc. in the rich text editor to make the text look good on the website. Stripping of HTML is enabled in this particular Umbraco version by default btw.
Do you have any clue about how the news listing is being rendered? Is it a xslt file or some razor that is being used? If you know or can figure out what file is being used it would be good to post it in here since it will be easier to figure out what might be the issue.
Looking forward to hearing from you.
/Jan
Hi Jan
Sorry for the delay in replying, there are quite a few new tasks involved in the company takeover of which the website is just one part :-/
I've looked through all of the sections in the UI and especially the Developer tools, and the only file that seems to relate to this output is this (hope the forum will render inline code?):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:umbraco.contour="urn:umbraco.contour" xmlns:tagsLib="urn:tagsLib" xmlns:BlogLibrary="urn:BlogLibrary"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets umbraco.contour tagsLib BlogLibrary ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<ul>
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
<xsl:sort select="@updateDate" order="descending" />
<li>
<div class="news-date">
<span class="year"><xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'yyyy')"/></span>
<span class="day"><xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'dd')"/></span>
<span class="month"><xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'MMMM')"/></span>
</div>
<div class="news-abstract">
<h3><xsl:value-of select="@nodeName"/></h3>
<xsl:value-of select="pagecontent" disable-output-escaping="yes"/>
</div>
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
Does this look like the correct section?
Hi Mani
Well it seems to be the correct file - but I don¨t know if perhaps there are some more being used to render the "pagecontent" field. Have you also checked the templates to see if the field is being rendered directly in that one?
The above file looks fine in regards to the described issue in your initial post - this is not where the problem is it seems.
/Jan
Hi,
I have experienced that "umbraco.library:RemoveFirstParagraphTag" causes the problem on a 4.7.0 solution.
is working on a reply...