getk2 / k2

K2 - the powerful content extension for Joomla
https://getk2.org
GNU General Public License v3.0
135 stars 96 forks source link

Attachment link in item not work with SEF URL active #528

Closed nucleocreativo closed 4 years ago

nucleocreativo commented 4 years ago

Hello,

the attachment item link return 404 error with the SEF URL option is active.

Thanks

fevangelou commented 4 years ago

Please use the K2 forum https://www.joomlaworks.net/forum/k2 for such questions.

nucleocreativo commented 4 years ago

Sorry but I think that it is code problem before the row href=$attachment->link; return error 404, with the row href=JRoute::_('media/k2/attachments/'.$attachment->filename); work! Thanks

fevangelou commented 4 years ago

Which file and line exactly?

nucleocreativo commented 4 years ago

The files are item.php and category-item.php in default template

fevangelou commented 4 years ago

Yes, but where exactly? Inside your template's html/com_k2/ folder?

nucleocreativo commented 4 years ago

In this directory: components/com_k2/templates/default

fevangelou commented 4 years ago

Looks like you have Advanced SEF enabled. This is the issue in K2 v2.10.3. It'll be resolved in the upcoming K2 v2.10.4.

In the meantime you can just use the URL router from 2.10.2. More here: https://github.com/getk2/k2/issues/522

nucleocreativo commented 4 years ago

Thanks!