error importing from excel

A place to discuss and receive support for the Library DB application.

error importing from excel

Postby magazzu » Tue Jan 24, 2012 11:31 am

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
magazzu
 
Posts: 11
Joined: Tue Jan 17, 2012 4:49 am

Re: error importing from excel

Postby shannah » Tue Jan 24, 2012 1:26 pm

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: error importing from excel

Postby magazzu » Wed Jan 25, 2012 10:52 am

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
magazzu
 
Posts: 11
Joined: Tue Jan 17, 2012 4:49 am

Re: error importing from excel

Postby Byron » Sat Sep 01, 2012 12:12 am

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
Byron
 
Posts: 1
Joined: Sat Sep 01, 2012 12:08 am


Return to Library DB Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

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