Bug regarding the file attached to a book.

Started by Kepa, 07 April 2011, 20:46:54

Previous topic - Next topic
A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

Kepa

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.

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

federica

Hi kepa,
thanks for reporting, but on that file (row 81) I see this code:
$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:
<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.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

Kepa

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.