Error parsing valuelists.ini

A place for users and developers of the Xataface to discuss and receive support.

Error parsing valuelists.ini

Postby tomhousley » Mon Aug 22, 2011 1:49 pm

Hello,

I receive this error:

Warning: Error parsing /var/www/html/example.com/draft/tables/cms_site/valuelists.ini on line 35 in /var/www/html/example.com/draft/xataface-1.2.5/Dataface/ConfigTool.php on line 441

Line 35 happens to be no=Norway, if I change it to na=Norway, it doesn't show an error. Is 'no' problematic somehow? I could do a messy workaround, but as the value 'no' is needed to use a translation script.

Relevants bits shown below.

My fields.ini looks like this:
Code: Select all
[sit_languages]
widget:label = "Choose Languages"
widget:type=checkbox
vocabulary=languages
visibility:list = hidden


My valuelists.ini looks like this:
Code: Select all
[languages]
   af=Afrikaans
   ar=Arabic
   be=Belarusian
   bg=Bulgarian
   ca=Catalan
   cs=Czech
   cy=Welsh
   da=Danish
   de=German
   el=Greek
   en=English
   es=Spanish
   et=Estonian
   fa=Persian
   fi=Finnish
   fr=French
   ga=Irish
   gl=Galician
   he=Hebrew
   hi=Hindi
   hr=Croatian
   hu=Hungarian
   id=Indonesian
   is=Icelandic
   it=Italian
   ja=Japanese
   ko=Korean
   lt=Lithuanian
   lv=Latvian
   mk=Macedonian
   ms=Malay
   mt=Maltese
   nl=Dutch
   no=Norway
   pl=Polish
   pt=Portuguese
   ro=Romanian
   ru=Russian
   sk=Slovak
   sl=Slovenian
   sq=Albanian
   sr=Serbian
   sv=Swedish
   sw=Swahili
   th=Thai
   tl=Filipino
   tr=Turkish
   uk=Ukrainian
   vi=Vietnamese
   yi=Yiddish
   zh-cn=Chinese-Simplified
   zh-tw=Chinese-Traditional


Any help would be gratefully received!

Many thanks, Tom
tomhousley
 
Posts: 52
Joined: Thu Feb 26, 2009 1:02 am
Location: United Kingdom

Re: Error parsing valuelists.ini

Postby shannah » Mon Aug 22, 2011 1:51 pm

Limitations of INI files unfortunately. This line:
Code: Select all
no=Norway

is tripping it up because "no" is a reserved word.

Workaround is to either move the valuelist into the database, or into a delegate class.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 20 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved