Author Topic: archive search error: Column 'description' ambiguous  (Read 81 times)

Offline hymeno

  • Coccinella
  • *
  • Posts: 10
  • Karma: +0/-0
archive search error: Column 'description' ambiguous
« on: 29 April 2019, 13:02:18 »
hi,

there could be a little archive search error:

Search - Alexandria Book Library
Search in booklists
Archived Books: "On"

that creates with the J!-search a:
Column 'description' in field list is ambiguous

regards,
hym

(latest J! & abbook)

Offline federica

  • Amministratore
  • Delfino
  • *****
  • Posts: 1.006
  • Karma: +1/-0
Re: archive search error: Column 'description' ambiguous
« Reply #1 on: 29 April 2019, 14:57:54 »
Many thanks for your notice!

To fix this bug you have to modify plugins/search/book/book.php line 198
from
Code: [Select]
.'description AS text,'to
Code: [Select]
.'a.description AS text,'
I will fix the bug in the next release.
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 hymeno

  • Coccinella
  • *
  • Posts: 10
  • Karma: +0/-0
Re: archive search error: Unknown column 'a.publish_up'
« Reply #2 on: 29 April 2019, 15:23:42 »
thx for the quick reply
mmh ...
this changes the error messages
Unknown column 'a.publish_up' in 'where clause'
 ???

Offline hymeno

  • Coccinella
  • *
  • Posts: 10
  • Karma: +0/-0
Re: archive search error: Column 'description' ambiguous
« Reply #3 on: 29 April 2019, 15:50:13 »
I quote out that
Code: [Select]

// .'AND (a.publish_up = '.$db->Quote($nullDate).' OR a.publish_up <= '.$db->Quote($now).') '
// .'AND (a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).')'
then the search works, but for a click on an archived entry, then unfortunately I get a
View not found [name, type, prefix]: archive, html, abookView
...  :-\



Offline federica

  • Amministratore
  • Delfino
  • *****
  • Posts: 1.006
  • Karma: +1/-0
Re: archive search error: Column 'description' ambiguous
« Reply #4 on: 29 April 2019, 16:26:22 »
Modify also line 206 and 207
from:
Code: [Select]
.'AND (a.publish_up = '.$db->Quote($nullDate).' OR a.publish_up <= '.$db->Quote($now).') '
.'AND (a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).')' );
to
Code: [Select]
);
Now it is ok?
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 hymeno

  • Coccinella
  • *
  • Posts: 10
  • Karma: +0/-0
Re: archive search error: Column 'description' ambiguous
« Reply #5 on: 03 May 2019, 00:28:21 »
Yes. Thank you!

(the a.publish_up- and the view-error did not occur after a while ?? ... so i don't comment it out)

regards