jDownloadsownloads.com


Author Topic: Content Download returns null on new JDownloads installl  (Read 335 times)

0 Members and 1 Guest are viewing this topic.

Offline dom.isadore

  • Newbie
  • *
  • Posts: 3
Hello,

I use jDownloads on an existing site I support and I like it very much. I'm working on rebuilding this site in a local test environment hosted on XAMPP, with Joomla 3.8.5. After I install the latest jDownloads, with com_jdownloads_3.2.56_J32.zip, I then upload a file, create a download, and activate the Content plugin. I just this tag in an article {jd_file file==1} and get an error when I click on Download in the Article. The whole front-end webpage gives an error instead of downloading the file, which is:"0 CALL TO A MEMBER FUNCTION GET() ON NULL The page you are looking for was moved, removed, renamed or might never existed." There is no way I can see to debug this error even though I have all of the recommended debug options turned on (except Debug Language which itself causes an error in a Date field).

Can you please help me to solve this problem? I'd really prefer to use your software for downloads in our site, but can't move forward at present.

Update:

As an aid, I've noticed that the Content plugin in an article sends the user to this URL on download:
/canonsregularRedotwo/index.php/component/jdownloads/download/2-sermons/1-septuagesima-2018

However, I've found that this URL - based on the behavior of my current site usage - is successful when I change the "download" path segment to "send":
/canonsregularRedotwo/index.php/component/jdownloads/send/2-sermons/1-septuagesima-2018

Dom Isadore
« Last Edit: 22.02.2018 10:45:04 by Arno »

Offline ColinM

  • Moderator
  • *
  • Posts: 3.549
Re: Content Download returns null on new JDownloads installl
« Reply #1 on: 15.02.2018 11:32:27 »
Hi
Thanks for the information. First a couple of questions. In jD config - Downloads tab has field 'Upload directory path' been set OK?   For example in XAMPP it should be like C:/xampp/htdocs/<your-test-site-directory-name>/jdownloads

Also can you see the Download in the backend and does it have an id of 1?

On mmy XAMPP test site the reference is
 <a href="/<my-test-site-directory-name>/index.php/all-cats/download/9-topcat-sub1/31-test">test</a>
where sub cat 'topcat-sub1' has an id of 9 and the Download 'test' has an id of 31.

Do you have some SEO software installed as these often do not understan jD.  For reference on my test site in Global Config I have SEO settings of 'Search Engine Friendly URLs' as Yes and 'Use URL Rewriting' as No because the URL rewriting is specific to Apache and IIS servers.

Colin

Offline dom.isadore

  • Newbie
  • *
  • Posts: 3
Re: Content Download returns null on new JDownloads installl
« Reply #2 on: 16.02.2018 04:48:05 »
Thank you, Colin, for your reply.

The Upload directory path is set as you say, and I can see the PDF file in the "<Category>" file, which is "Sermons".

The Download and Category each have their id set.

The Global Config. settings are as you describe.

Something more that I have noticed:

The failing link with the "download" path segment in it is actually the Link for the download title in the Article generated by the Content plugin. This is gives the error page. The "Download" button itself is the one with the "send" path segment which successfully gives the file itself. I am not sure what is supposed to be in that title link. Might it be the Categories link? Or the detailed information page for the download file?

 I've also noticed this in the backend in the jDownloads component:

The "Link" link shows the error in the backend Categories page in jDownload Component:
/canonsregularRedotwo/index.php?option=com_jdownloads&view=category&catid=2

The "Download this file" symbol link shows the file successfully in the backend Downloads -> Edit Download page for this download in jDownload Component:
/canonsregularRedotwo/administrator/index.php?option=com_jdownloads&task=download.download&id=1

I'm wondering if it is an install error, something not enabled, or else I still have something misconfigured.
John
« Last Edit: 22.02.2018 10:46:30 by Arno »

Offline dom.isadore

  • Newbie
  • *
  • Posts: 3
Re: Content Download returns null on new JDownloads installl
« Reply #3 on: 18.02.2018 03:50:51 »
I have setup up a new, separate XAMPP with Joomla in it, and newly install JDownload in it as well as test. And it works fine with all of the default settings! I will have to rebuild my upgraded site in this new installation and go forward with it, as there appears to be something goofy with the old test site.

Offline ColinM

  • Moderator
  • *
  • Posts: 3.549
Re: Content Download returns null on new JDownloads installl
« Reply #4 on: 19.02.2018 19:06:41 »
John,
Glad you sorted it out. It was looking that way.
The download link is usually available via the the file type icon, the file title and the download button. This does depend on what you have set in the Configuration.
In jD config - Frontend tab is 'Use files title as download link?' set to Yes?

In jD Config - Plugins tab which Default Layout have you selected to use? I would suggest either 'Files Link only v3.2' or 'Files Link Single Line v3.2'

Colin