Author Topic: New Installation -- error when clicking on a new menu item  (Read 1566 times)

Offline adaniel

  • Coccinella
  • *
  • Posts: 5
  • Karma: +0/-0
I'm using Joomla and the Alexandria Book Library extension, to create a church media lending library for about 350 items(DVDs, CDs, and a few VHS).

I have installed the latest ABook into a new  install of Joomla, and used the ABook extension to create categories, libraries, and locations.  I exported data from our old library system into CSV files, and  then proceeded to import books (in our case 'books' are DVDs, VHS, CDs) into ABook. Since my attempt to import the data through the built in ABook "Import" feature failed with an error, I opened the MySQL database directly, and imported data into each of the following tables inside the ABook database:

abauthor
abbook
abbookauth
abbooktag
abtag

This appears to have been successful, as the library items all linked up nicely, and I can access all the imported data through the Joomla, ABook back end without any problem.  The "books" all show the correct authors, tags, etc. letting me know that the tables are linking together correctly.

The problem I'm having is when I create the menus for the Joomla front end.
I created a menu item on the Main Menu to show all categories called "All Items" with a menu item type of "Category".

When I click on this menu item, I get the following error:

1054 Unknown column 'use_book' in 'order clause' SQL=SELECT CONCAT(a.lastname, " ", a.name) AS author, a.id AS idauthor, a.alias FROM #__abbookauth AS b INNER JOIN #__abauthor AS a ON a.id = b.idauth WHERE b.idbook = 957 ORDER BY use_book

It seems to be indicating that the reference to a column named 'use_book' in the SQL statement is incorrect.

How can I resolve this ?

Thank you -

Annette


Offline federica

  • Amministratore
  • Delfino
  • *****
  • Posts: 980
  • Karma: +1/-0
Re: New Installation -- error when clicking on a new menu item
« Reply #1 on: 10 May 2018, 14:41:04 »
Hi adaniel,
this is not a correct migration. You have to update the old site at the current version then export by sql and import to a fresh installation.
Anyway, since you've already done everything differently, try to change the option "Use book settings" at all in every selectbox you see (abook menu configuration and abook general configuration).
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
http://www.antivirushelp.it
stacca la spina!

Offline adaniel

  • Coccinella
  • *
  • Posts: 5
  • Karma: +0/-0
Re: New Installation -- error when clicking on a new menu item
« Reply #2 on: 10 May 2018, 15:15:32 »
Thank you for the information.  I realize that I was not clear in my first post about the data import.  I did not migrate my data from an older version of ABook.  We had never used ABook before, so the installation of ABook under Joomla was a completely new installation on a site where ABook had never been installed before. New install of Joomla, and new install of the latest version of ABook.  The data that I migrated was from a different library software.  I formatted that data into separate CSV files, each matching the structure of the tables I indicated in my previous post, and imported the data through CSV.  That is why I was confused about the "missing column".  The version of ABook that I downloaded and installed from your site was version 3.1.4 from the "downloads" link.  It is listed as the current version of ABook.

From your response, it seems that somehow in the import process I either left a field empty that should have content, or placed content into a field that should be empty.   What table and field is this error about "use_book" column actually referring to ?  I can perhaps modify my table/fields contents through MySQL to eliminate the error.

Thank you for your help -

Annette



Offline federica

  • Amministratore
  • Delfino
  • *****
  • Posts: 980
  • Karma: +1/-0
Re: New Installation -- error when clicking on a new menu item
« Reply #3 on: 10 May 2018, 17:39:08 »
Ah ok, I understud.
The "use_book" string may be present in both #_menu or #_extensions tables, not in abook tables.

Have you try to change the option "Use book settings" to "default" in every selectbox you see (abook menu configuration and abook general configuration)?

Otherwise try to delete the menu item and create it again or try to change author order (in general configuration or menu configuration).
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
http://www.antivirushelp.it
stacca la spina!

Offline adaniel

  • Coccinella
  • *
  • Posts: 5
  • Karma: +0/-0
Re: New Installation -- error when clicking on a new menu item
« Reply #4 on: 11 May 2018, 18:36:13 »
Thanks for the tips.  The menu problem is now solved.  I looked in the #_extensions table and did find an entry for abook that had the "use_book" in the params field.  I did not change anything there, but at your suggestion, I edited the menu item that was not working.  Under "Book Options" tab, and the field "Author Order", there was a "Use Book" setting.  I changed it to "Ascending".  The menu now works correctly.

For future reference when working with ABook, can you explain to me why my having a "Use Book" setting in "Author Order" was causing the error I previously mentioned ?  Is it due to some field within one of the tables containing imported data that was either empty, or filled with invalid information ?  The reason I ask is that we may want to use the "Use Book" setting of the "Author Order" field at some point in the future, and I would like to be able to resolve the underlying problem, if at all possible.

Here is something else I observed:

After the import, I edited 22 of the library items through the ABook extension to fix things such as titles, descriptions, etc.  Once I had applied the fix to the "All Items" menu item (as described above), at first the only library items that would be displayed were the 22 library items that I had edited in ABook from the backend.  The other 328 items were not showing up when the menu was clicked.  All 348 items were showing up on the backend, but only 22 showed up when I clicked the menu on the front end.  After looking into the MySQL table and comparing field contents between the 22 that did display with those that did not display, I noticed the ones that displayed all had a number in "asset_id".  The ones that did not display had nothing in that field.  I experimented by going to the back end and editing one of the books that did not have an asset_id.  I made no changes to field content, instead I just clicked "Save".  That book was then assigned an asset_id by ABook, and it now shows up on the front end when I clicked on the "All Items" menu item.  I tried this on another dozen books, and the same thing happened.  The asset_id would be created and the library items would appear when clicking on the "All Books" menu item.  Obviously, there were some internal linkings/connections that were not created yet, and by bringing up the item, then clicking "Save", ABook is creating those links automatically.
 
Is there a way to recreate those internal links without bringing each library item individually and clicking "Save"?  If not, fortunately, we do only have 348 items in our library, and we can edit each one -- and then click "Save" -- if we need to.

Again, thank you for your assistance, and the tips in getting the menu problem resolved.

Annette

Offline federica

  • Amministratore
  • Delfino
  • *****
  • Posts: 980
  • Karma: +1/-0
Re: New Installation -- error when clicking on a new menu item
« Reply #5 on: 26 June 2018, 15:58:14 »
can you explain to me why my having a "Use Book" setting in "Author Order" was causing the error I previously mentioned ?
"Use Book" get the autor order as you configured in the related book. The error could be caused by a bug. I will investigate about that as soon as possible.

Is there a way to recreate those internal links without bringing each library item individually and clicking "Save"?
For each book joomla creates an "asset_id" (you can see that in #_asset table). Abook import process manages also the asset id but if you have used a manual import it is not been created. I'm sorry but I don't know an automatic way to recreate the asset_id.
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
http://www.antivirushelp.it
stacca la spina!