Page 1 of 1

error importing from excel

PostPosted: Tue Jan 24, 2012 11:31 am
by magazzu
Hello,

I'm trying to import a book list from an excel file using the "Import Records Form", but I get this error:

Fatal error: Uncaught exception 'Exception' with message 'Illegal relationship name.' in /var/www/dataface/Dataface/Application.php:702 Stack trace: #0 /var/www/dataface/Dataface/Application.php(1665): Dataface_Application->Dataface_Application(NULL) #1 /var/www/dataface/dataface-public-api.php(58): Dataface_Application::getInstance(NULL) #2 /var/www/index.php(20): df_init('/var/www/index....', 'dataface') #3 {main} thrown in /var/www/dataface/Dataface/Application.php on line 702

I have no idea...

Thanks

Antonio

Re: error importing from excel

PostPosted: Tue Jan 24, 2012 1:26 pm
by shannah
It has been a long time since I've done an excel import with LibrarianDB so I'm not sure exactly what is going on there. Have you made any modifications to the code or config files (e.g. any changes to any of the relationships.ini files?)

Also for my info, what version of Librarian DB are you using?
And are you using the sample import spreadsheet or one of your own format?

-Steve

Re: error importing from excel

PostPosted: Wed Jan 25, 2012 10:52 am
by magazzu
Yes, I modified the code. Namely, in the books table, I made changes in books.php, fields.ini, valuelists.ini.

I found out that the error disappears if I comment these lines in Dataface/Application.php:

if ( isset($query['-relationship']) ){
if ( !preg_match('/^[a-zA-Z0-9_]+$/', $query['-relationship']) ){
throw new Exception("Illegal relationship name.");
}

However, I get problems later, while parsing the excel file. I am using another format, but I don't think this is the problem. In fact, ther following 'if' statement results true, before reaching the real structure of the file.

if ( ExcelXMLError::isError($result) ) ...

Anyway, I implemented a csv importer, as explained in the documentation, and I am OK. I have no need of the excel importer anymore.

Thanks

Antonio

Re: error importing from excel

PostPosted: Sat Sep 01, 2012 12:12 am
by Byron
I've been looking around to find some docs on this, but I couldn't find it, although I'm sure it must be somewhere :P

I have a site, which is maintained by one person - an ADMIN, but there is also a blog, so I want to add two more users, but they should only VIEW/EDIT the blog, nothing more and nothing less