Friendly URLs get "cleaned", to remove invalid characters. I believe the default function just removes anything not a-z/0-9. Try overriding the cleanFU (or similar) function.
On Tue, Aug 3, 2010 at 2:23 AM, smika <[email protected]> wrote: > Ok, here is where i am stuck right now:) : > > 1. We've extrended farFU: > <cfproperty > name="language" type="string" default="" hint="The > application name > that the friendly URL is a part of. Useful for subsites." > ftSeq="9" > > > 2.:In setSystemFU function we've changed: > <cfif not StructKeyExists(stLocal.stObj,"status") OR > stLocal.stObj.status EQ "approved"> > > <!--- Get the current system fu object for a > given refobjectid --- > > > <cfset stLocal.stCurrentSystemObject = > getSystemObject(refObjectID="#arguments.objectid#") /> > > <!--- Generate the new system FU for the > current object ---> > <cfset stLocal.newFriendlyURL = > getSystemFU(objectID="#arguments.objectid#", > typename="#arguments.typename#") /> > > <cfif > structIsEmpty(stLocal.stCurrentSystemObject)> > <cfset > languageList="armenian,russian,english"/> > <!--- See if their is a current > default object ---> > <cfset > stLocal.stCurrentDefaultObject = > getDefaultFUObject(refObjectID="#arguments.objectid#") /> > <cfloop list="#languageList#" index="i"> > <!--- No System FU object currently > set ---> > <cfset > stLocal.stCurrentSystemObject.objectid = > application.fc.utils.createJavaUUID() /> > <cfset > stLocal.stCurrentSystemObject.refObjectID = > arguments.objectid /> > <cfset > stLocal.stCurrentSystemObject.fuStatus = 1 /> > <cfset > stLocal.stCurrentSystemObject.redirectionType = "none" /> > <cfset > stLocal.stCurrentSystemObject.redirectTo = "default" /> > <cfset stLocal.stCurrentSystemObject.language = > #i# /> > <cfset > stLocal.stCurrentSystemObject.friendlyURL = > getUniqueFU(friendlyURL="#left(stLocal.newFriendlyURL,245)#") /> > > <!--- If no default object, set this > as the default ---> > <cfif > structIsEmpty(stLocal.stCurrentDefaultObject)> > <cfset > stLocal.stCurrentSystemObject.bDefault = 1 /> > </cfif> > <cftry> > <cfset stLocal.stResult = > setData(stProperties="#stLocal.stCurrentSystemObject#") /> > <cfcatch type="any"> > > <cfoutput><p>#getUniqueFU(friendlyURL="#stLocal.newFriendlyURL#")#</ > p></cfoutput> > <cfdump var="#stLocal#" > expand="false" label="stLocal" / > ><cfabort showerror="debugging" /> > </cfcatch> > </cftry> > </cfloop> > <cfelse> > <cfset stLocal.newFriendlyURL = > getUniqueFU(friendlyURL="#left(stLocal.newFriendlyURL,245)#", > FUID="#stLocal.stCurrentSystemObject.objectid#") /> > <cfif stLocal.newFriendlyURL NEQ > stLocal.stCurrentSystemObject.friendlyURL> > <!--- NEED TO ARCHIVE OLD > SYSTEM OBJECT AND UPDATE ---> > <cfset stLocal.stResult = > archiveFU(objectid="#stLocal.stCurrentSystemObject.objectid#") /> > <cfset > stLocal.stCurrentSystemObject.friendlyURL = > stLocal.newFriendlyURL /> > <cfset stLocal.stResult = > setData(stProperties="#stLocal.stCurrentSystemObject#") /> > </cfif> > </cfif> > > > 3. In getSystemFU we've added: > <cfargument name="language" required="false" default="" type="string" > hint="Content item FU Language."> > > <cfset stMetaProps = structNew()> > <cfset stMetaProps.language = #arguments.language#> > > <skin:view typename="#stobj.typename#" > objectid="#stobj.objectid#" > webskin="displaySystemFU" r_html="systemFU" alternateHTML="" > stParam="#stMetaProps#"> > > 4. under my ctArticle webskins in displaySystemFU.cfm i've added: > > <cfparam name="articleTitle" default="#stObj.title#"/> > <cfparam name="stParam.language" default="russian"> > <cfif #stParam.language# eq 'armenian'> > <cfset articleTitle=#stObj.title_armenian#/> > <cfelseif #stParam.language# eq 'russian'> > <cfset articleTitle=#stObj.title_russian#/> > <cfelse> > <cfset articleTitle=#stObj.title#/> > </cfif> > > <cfset friendlyURLString = > "/article/#DateFormat(stObj.publishDate,'yyyy')#- > #DateFormat(stObj.publishDate,'mm')#- > #DateFormat(stObj.publishDate,'dd')#-#articleTitle#"> > > It works fine and generate language based FUs, but...when it comes to > non-latin characters in titles of articles it does not process them > and does not insert them to DB: > /article/2010-06-12- (armenian) > /article/2010-06-12-the-committee-on-state-revenues-of-armenia-found- > unlicensed-manufacture-beverages-search-actions-carried-out-by-armenia- > sotrudnikamizolotoy-stock-is-concentrated-in-the-dome (english) > > While trying to debug, we've add some <cflog statements to check on > progress, and we've mentioned that it is trying to create something > out of non-lating chars, but replacing them with questionmarks, and > does not further process them. > > I cant understand whats wrong with this code. > > > > > > > > -- > You received this message cos you are subscribed to "farcry-dev" Google > group. > To post, email: [email protected] > To unsubscribe, email: > [email protected]<farcry-dev%[email protected]> > For more options: http://groups.google.com/group/farcry-dev > -------------------------------- > Follow us on Twitter: http://twitter.com/farcry > -- You received this message cos you are subscribed to "farcry-dev" Google group. To post, email: [email protected] To unsubscribe, email: [email protected] For more options: http://groups.google.com/group/farcry-dev -------------------------------- Follow us on Twitter: http://twitter.com/farcry
