Page 1 of 1

404 when opening file included in article

Posted: 24 Aug 2017, 18:20
by comfix
Just installed the download plugin and seems not to be working.
I add the code in a K2 article which appears fine, but when clicking on the download button, I get a 404.

These errors:

/home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Illegal string offset 'type' in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Illegal string offset 'creationDate' in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Illegal string offset 'author' in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Illegal string offset 'copyright' in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Illegal string offset 'authorEmail' in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Cannot assign an empty string to a string offset in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Illegal string offset 'authorUrl' in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Illegal string offset 'version' in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Illegal string offset 'description' in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Illegal string offset 'group' in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Cannot assign an empty string to a string offset in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\nPHP message: PHP Warning: Illegal string offset 'filename' in /home/user/domains/domain.com/public_html/administrator/components/com_phocadownload/libraries/phocadownload/utils/utils.php on line 38\n', referer: https://domain.com/administrator/index. ... _installer


System info:
PHP Version 7.1.5
Web Server Apache/2
WebServer to PHP Interface fpm-fcgi
Joomla! Version Joomla! 3.7.5 Stable [ Amani ] 14-August-2017 12:09 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

Re: 404 when opening file included in article

Posted: 27 Aug 2017, 11:00
by Jan
Hi, can I see the site where this occurs? Disable displaying of development warnings (warnings for developers) in your Joomla! configuration, such warnings should not have any influence on running the code :idea:

https://www.phoca.cz/documents/50-phoca ... tic-method

Do you still get the same problems when you disable development warnings?

404 in fact does not have any dependency to the warnings as if there is a php fatal error, script is broken with error 500. 404 means that the article was not found.

Jan

Re: 404 when opening file included in article

Posted: 29 Aug 2017, 12:36
by comfix
These are now disabled, I've created a new file and still same error:
404 - View is niet gevonden [name, type, prefix]: article, html, phocadownloadView

Code which I add to K2 article:

Code: Select all

{phocadownload view=file|id=4}
I have also SecurityCheck Pro running, maybe this blocks it?

Re: 404 when opening file included in article

Posted: 29 Aug 2017, 13:48
by Benno
Hi,
did you create a menu link to Phoca Download Component (List of categories)?
See this article. It discribed the problem for Phoca Gallery & Phoca Gallery Plugin but for Phoca Download & Phoca Download Plugin it's the same: https://www.phoca.cz/documents/16-jooml ... -in-joomla
So if you are using module or plugin which works together with component (e.g. modules and plugins for Phoca Download, Phoca Gallery, etc.) then you need to create menu link to component, so module or plugin can find Itemid of the component menu link and can create the link to component correctly.
Kind regards,
Benno

Re: 404 when opening file included in article

Posted: 03 Sep 2017, 13:56
by comfix
So I've created a new menu with the link to the file and now the module seems to work fine and the download is found. Thanks! :)

Re: 404 when opening file included in article

Posted: 03 Sep 2017, 16:47
by Benno
You're welcome!

Kind regards,
Benno