Author Topic: Bug regarding the file attached to a book.  (Read 29287 times)

Kepa

  • Guest
Bug regarding the file attached to a book.
« on: 07 April 2011, 20:46:54 »
Hello:

I'd like to share with you the next possible bug I've just detected in the \components\com_abook\views\book\view.html.php file that creates the display of the book details in com_abook 1.1.0:

The piece of code of line 81:

$lists['file_path'] = JHTML::_('link', 'images'.'/'.$params->get( 'file_path').'/'.$book->file);

doesn't display the file attached to a book because something appear to be missing. I have rewritten it as follows:

$lists['file_path'] = JHTML::_('link', 'images'.'/'.$params->get( 'file_path').'/'.$book->file, 'Digitalized book')

and now the text "Digitalized book" -or whatever text- does display a link to file attached to a book.

Hope this is of any help to you.

Best.

Offline federica

  • Amministratore
  • Delfino
  • *****
  • Posts: 1.043
  • Karma: +1/-0
Re: Bug regarding the file attached to a book.
« Reply #1 on: 08 April 2011, 10:27:29 »
Hi kepa,
thanks for reporting, but on that file (row 81) I see this code:
Code: [Select]
$lists['file_path'] = JHTML::_('link', 'images' .DS .$params->get( 'file_path').DS.$book->file, $book->file);Try to put this code in your file and you see if you like the result.
This is the html output:
Code: [Select]
<div><strong>file: </strong><a href="/images/file_path/file_name.ext">file_name</a></div>
Bye bye
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!

Kepa

  • Guest
Re: Bug regarding the file attached to a book.
« Reply #2 on: 08 April 2011, 15:37:36 »
Hi, federica:

You're right. I've just taken a look at that line of code and it reads and works just as you say. I think I probably modified the original view.html.php file for checking whatever (surely to change the file name for the text "Digitalized version"), but then forgot undoing the changes so I found my own bug on it... Sorry for giving you still more trouble.  ::) Thanks a lot anyway for your quick and straightforward aid.  :)

At this moment I'm "fighting hard" with some kind of error 500 regarding the display of the content of single categories. Hope I soon find the problem by my self and won't have to bother you with this issue...  ;D

Bye.