News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Possible bug in JDownloads 4 - layout editor/selector

Started by Finlay, 01.11.2023 18:00:54

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Finlay

Hi

I hope you can help with a quick question.

I'm upgrading a site from Joomla 3 to Joomla 4. For reasons that are not relevant here, I'm having to do it manually.

The old site used JDownloads 3.9.8.7 successfully.

We have a new site under construction using Joomla 4, PHP 8.0.26 and the JA Purity IV template. JDownloads 4 is installed. The whole site is being built using WAMPSERVER64 on Win11.

I have configured JDownloads 4 as an almost mirror image of JDownloads 3.9.8.7 (there are a few extras in version 4 which are not relevant to our setup).

I've been doing test uploads and downloads and all seems to function as in JDownloads 3.9.8.7 except one thing the layout of the downloads listing.

Our old site used a customised layout for the Downloads section. Today, I went in to customise the layout in JDownloads 4. Immediately, I was hit with warning errors (see below). I was unable to edit any of the layouts AND selecting different layouts in  jDownloads: Options/Content Plugin made no difference to the page appearance. All pages displayed download file details as per the attached.

I tried importing the old customised layout. I was able to do so but selecting it in  jDownloads: Options/Content Plugin still made no difference to the page layout. It still looked like the attached.

Question: Is this a bug in JDownloads 4 or a conflict with any part of the sandbox in which JDownloads 4 is being configured?

Thanks in advance for any clarification you can give.


( ! ) Warning: Undefined property: JDownloads\Component\JDownloads\Administrator\View\Templates\HtmlView::$active1 in C:\wamp64\www\newsite\administrator\components\com_jdownloads\tmpl\templates\default.php on line 60 Call Stack #TimeMemoryFunctionLocation 10.0001366472{main}( )...\index.php:0 20.0001367256require_once( 'C:\wamp64\www\newsite\administrator\includes\app.php )...\index.php:32 30.01111375176Joomla\CMS\Application\CMSApplication->execute( )...\app.php:61 40.01151548768Joomla\CMS\Application\AdministratorApplication->doExecute( )...\CMSApplication.php:293 50.06923821992Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? )...\AdministratorApplication.php:186 60.07354037592Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_jdownloads', $params = ??? )...\AdministratorApplication.php:143 70.07484101504Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch( )...\ComponentHelper.php:361 80.07504177080Joomla\CMS\MVC\Controller\BaseController->execute( $task = 'display' )...\ComponentDispatcher.php:143 90.07504177080JDownloads\Component\JDownloads\Administrator\Controller\DisplayController->display( $cachable = ???, $urlparams = ??? )...\BaseController.php:693 100.07544177192Joomla\CMS\MVC\Controller\BaseController->display( $cachable = ???, $urlparams = ??? )...\DisplayController.php:50 110.07614211176JDownloads\Component\JDownloads\Administrator\View\Templates\HtmlView->display( $tpl = ??? )...\BaseController.php:660 120.37744787968Joomla\CMS\MVC\View\HtmlView->display( $tpl = NULL )...\HtmlView.php:87 130.37794789736Joomla\CMS\MVC\View\HtmlView->loadTemplate( $tpl = NULL )...\HtmlView.php:203 140.37884809104include( 'C:\wamp64\www\newsite\administrator\components\com_jdownloads\tmpl\templates\default.php )...\HtmlView.php:415 " href="index.php?option=com_jdownloads&view=templates&type=1">Categories
( ! ) Warning: Undefined property: JDownloads\Component\JDownloads\Administrator\View\Templates\HtmlView::$active8 in C:\wamp64\www\newsite\administrator\components\com_jdownloads\tmpl\templates\default.php on line 63 Call Stack #TimeMemoryFunctionLocation 10.0001366472{main}( )...\index.php:0 20.0001367256require_once( 'C:\wamp64\www\newsite\administrator\includes\app.php )...\index.php:32 30.01111375176Joomla\CMS\Application\CMSApplication->execute( )...\app.php:61 40.01151548768Joomla\CMS\Application\AdministratorApplication->doExecute( )...\CMSApplication.php:293 50.06923821992Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? )...\AdministratorApplication.php:186 60.07354037592Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_jdownloads', $params = ??? )...\AdministratorApplication.php:143 70.07484101504Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch( )...\ComponentHelper.php:361 80.07504177080Joomla\CMS\MVC\Controller\BaseController->execute( $task = 'display' )...\ComponentDispatcher.php:143 90.07504177080JDownloads\Component\JDownloads\Administrator\Controller\DisplayController->display( $cachable = ???, $urlparams = ??? )...\BaseController.php:693 100.07544177192Joomla\CMS\MVC\Controller\BaseController->display( $cachable = ???, $urlparams = ??? )...\DisplayController.php:50 110.07614211176JDownloads\Component\JDownloads\Administrator\View\Templates\HtmlView->display( $tpl = ??? )...\BaseController.php:660 120.37744787968Joomla\CMS\MVC\View\HtmlView->display( $tpl = NULL )...\HtmlView.php:87 130.37794789736Joomla\CMS\MVC\View\HtmlView->loadTemplate( $tpl = NULL )...\HtmlView.php:203 140.37884809104include( 'C:\wamp64\www\newsite\administrator\components\com_jdownloads\tmpl\templates\default.php )...\HtmlView.php:415 " href="index.php?option=com_jdownloads&view=templates&type=8">Subcategories
( ! ) Warning: Undefined property: JDownloads\Component\JDownloads\Administrator\View\Templates\HtmlView::$active4 in C:\wamp64\www\newsite\administrator\components\com_jdownloads\tmpl\templates\default.php on line 66 Call Stack #TimeMemoryFunctionLocation 10.0001366472{main}( )...\index.php:0 20.0001367256require_once( 'C:\wamp64\www\newsite\administrator\includes\app.php )...\index.php:32 30.01111375176Joomla\CMS\Application\CMSApplication->execute( )...\app.php:61 40.01151548768Joomla\CMS\Application\AdministratorApplication->doExecute( )...\CMSApplication.php:293 50.06923821992Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? )...\AdministratorApplication.php:186 60.07354037592Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_jdownloads', $params = ??? )...\AdministratorApplication.php:143 70.07484101504Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch( )...\ComponentHelper.php:361 80.07504177080Joomla\CMS\MVC\Controller\BaseController->execute( $task = 'display' )...\ComponentDispatcher.php:143 90.07504177080JDownloads\Component\JDownloads\Administrator\Controller\DisplayController->display( $cachable = ???, $urlparams = ??? )...\BaseController.php:693 100.07544177192Joomla\CMS\MVC\Controller\BaseController->display( $cachable = ???, $urlparams = ??? )...\DisplayController.php:50 110.07614211176JDownloads\Component\JDownloads\Administrator\View\Templates\HtmlView->display( $tpl = ??? )...\BaseController.php:660 120.37744787968Joomla\CMS\MVC\View\HtmlView->display( $tpl = NULL )...\HtmlView.php:87 130.37794789736Joomla\CMS\MVC\View\HtmlView->loadTemplate( $tpl = NULL )...\HtmlView.php:203 140.37884809104include( 'C:\wamp64\www\newsite\administrator\components\com_jdownloads\tmpl\templates\default.php )...\HtmlView.php:415 " href="index.php?option=com_jdownloads&view=templates&type=4">Category
Downloads
( ! ) Warning: Undefined property: JDownloads\Component\JDownloads\Administrator\View\Templates\HtmlView::$active5 in C:\wamp64\www\newsite\administrator\components\com_jdownloads\tmpl\templates\default.php on line 72 Call Stack #TimeMemoryFunctionLocation 10.0001366472{main}( )...\index.php:0 20.0001367256require_once( 'C:\wamp64\www\newsite\administrator\includes\app.php )...\index.php:32 30.01111375176Joomla\CMS\Application\CMSApplication->execute( )...\app.php:61 40.01151548768Joomla\CMS\Application\AdministratorApplication->doExecute( )...\CMSApplication.php:293 50.06923821992Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? )...\AdministratorApplication.php:186 60.07354037592Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_jdownloads', $params = ??? )...\AdministratorApplication.php:143 70.07484101504Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch( )...\ComponentHelper.php:361 80.07504177080Joomla\CMS\MVC\Controller\BaseController->execute( $task = 'display' )...\ComponentDispatcher.php:143 90.07504177080JDownloads\Component\JDownloads\Administrator\Controller\DisplayController->display( $cachable = ???, $urlparams = ??? )...\BaseController.php:693 100.07544177192Joomla\CMS\MVC\Controller\BaseController->display( $cachable = ???, $urlparams = ??? )...\DisplayController.php:50 110.07614211176JDownloads\Component\JDownloads\Administrator\View\Templates\HtmlView->display( $tpl = ??? )...\BaseController.php:660 120.37744787968Joomla\CMS\MVC\View\HtmlView->display( $tpl = NULL )...\HtmlView.php:87 130.37794789736Joomla\CMS\MVC\View\HtmlView->loadTemplate( $tpl = NULL )...\HtmlView.php:203 140.37884809104include( 'C:\wamp64\www\newsite\administrator\components\com_jdownloads\tmpl\templates\default.php )...\HtmlView.php:415 " href="index.php?option=com_jdownloads&view=templates&type=5">Download Details
( ! ) Warning: Undefined property: JDownloads\Component\JDownloads\Administrator\View\Templates\HtmlView::$active3 in C:\wamp64\www\newsite\administrator\components\com_jdownloads\tmpl\templates\default.php on line 75 Call Stack #TimeMemoryFunctionLocation 10.0001366472{main}( )...\index.php:0 20.0001367256require_once( 'C:\wamp64\www\newsite\administrator\includes\app.php )...\index.php:32 30.01111375176Joomla\CMS\Application\CMSApplication->execute( )...\app.php:61 40.01151548768Joomla\CMS\Application\AdministratorApplication->doExecute( )...\CMSApplication.php:293 50.06923821992Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? )...\AdministratorApplication.php:186 60.07354037592Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_jdownloads', $params = ??? )...\AdministratorApplication.php:143 70.07484101504Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch( )...\ComponentHelper.php:361 80.07504177080Joomla\CMS\MVC\Controller\BaseController->execute( $task = 'display' )...\ComponentDispatcher.php:143 90.07504177080JDownloads\Component\JDownloads\Administrator\Controller\DisplayController->display( $cachable = ???, $urlparams = ??? )...\BaseController.php:693 100.07544177192Joomla\CMS\MVC\Controller\BaseController->display( $cachable = ???, $urlparams = ??? )...\DisplayController.php:50 110.07614211176JDownloads\Component\JDownloads\Administrator\View\Templates\HtmlView->display( $tpl = ??? )...\BaseController.php:660 120.37744787968Joomla\CMS\MVC\View\HtmlView->display( $tpl = NULL )...\HtmlView.php:87 130.37794789736Joomla\CMS\MVC\View\HtmlView->loadTemplate( $tpl = NULL )...\HtmlView.php:203 140.37884809104include( 'C:\wamp64\www\newsite\administrator\components\com_jdownloads\tmpl\templates\default.php )...\HtmlView.php:415 " href="index.php?option=com_jdownloads&view=templates&type=3">Summary
CSS Files

  •  

Arno

Hi,
unfortunately, I can't do much with the attached (unfortunately unformatted!) error output.
I cannot understand the described misbehaviour, I need access to the backend when possible.

Unfortunately, the database tables differ between version 3.9 and 4.0 of jDownloads. This means that the tables are changed during the update process. Therefore, a manual upgrade is not possible without also making all changes to the tables manually. However, this would be quite a tedious process and prone to errors.

If there really is no other option for this Joomla installation, I would recommend
- create a local Joomla 3 installation
- install jDownloads 3.9
- delete the jDownloads tables and import the tables from the above installation there
- then perform the migration to Joomla 4 
- then export the updated tables again and import them into the database listed above.
 
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

Finlay

Hi Arno

Thanks for the fast reply. Apologies for the unformatted error output but that's how they spool out when going into Layouts (see attached).

To clarify, I'm not updating an existing installation of Joomla 3. I'm rebuilding our site manually from scratch in a separate location using Joomla 4 and the latest compatible extensions. It's completely new, with each extension checked for functionality when it is installed. When the site structure is complete, I input content. That's it. So far, I've had no problems except with JDownloads, which is the last extension to be installed.

The errors suggest a coding issue/incompatibility in the display template but I have no idea beyond that. It's certainly the case that the Layouts in Admin panel don't allow editing after these errors are shown, and the Layouts have no effect on the page display no matter which is selected in 'Content Plugin'.

Essentially, in this brand new installation of Joomla 4 with a brand new installation of JDownloads 4, the layout editing doesn't work and the selected layout has no effect on page display. From the errors shown in the attached picture, do you have any idea how to fix that?

I would be very happy to give you access to the back end but unfortunately it's on my local laptop.

Kind regards



  •  

ColinM

Hi
Could you please specify the detail steps you are taking to rebuild jD.

My approach to a manual  update would be to first make a clean install of jD4.  Ensure you create a List All jD Categories Menu Item which may be hidden.  From your old site take a copy of the folders and files in the jDownloads folder  and copy into the new site jDownloads folder.  Then use the jD Control Panel use the Check Download Area.  This will create the database entries for the Categories and Downloads.  You will lose  some info such as the description and similar but with the route you are adopting need to re-add these manually.  You will also need to set up your user group settings and permissions. From the old jD3 site export the 'special' layout. In the exported layout you need to change the <targetjdownloads> section to that of the new jD version.  This process is very tedious and error prone.
So better to use the approach advised by Arno

Colin
Colin M
  •  

Finlay

Hi Colin

Thanks for your reply.

My approach was more basic than you describe, if more labour intensive.

As I had no idea of the changes that took place between JDownloads 3.9.8.7 and JDownloads 4, I didn't wish to contaminate the new installation by taking short cuts.

So, the labour-intensive process I used was:

1. New installation of Joomla 4 on PHP 8.

2. New installation of all relevant extensions (Akeeba backup, Visforms, etc etc) including JDownloads 4. A new, clean install of the software.

3. Configured JDownloads for new category (we will use only one in this simple installation), menu item(s) as per JD documentation, and Options in the Control Panel.

4. I then manually uploaded 14 PDF files from the front end, specifying Title, Short Description and Image. I did this because the site will eventually be used by an administrator with limited IT skills and simple PDFs will up uploaded and labelled that way. I also wanted to check upload and download functionality and test that all was working as it should.

5. All worked fine. Downloads were listed in the specified category and could be downloaded (with download count increasing automatically). So far, so expected. I've set up JDownloads 3 times before on Joomla 3 and never had any issues.

6. The problem arose when I went into Layouts to try to customise the way the Downloads are presented. As you can see from previous posts, going into any Layouts subcategory (Layouts/Downloads, Layouts/Category, etc) produced a host of errors. If I ignored those errors and followed instructions to create a customised layout ("To create a new layout then select an existing layout and then click on the New button.") the 'new' layout editor opened with the title being un-editable, so it wasn't possible to create a new title.

I'm flagging this up because this is a brand new, clean installation of Joomla 4 and JD 4 with no possible contamination from Joomla 3. The errors that appear in the layouts editor/selector/activator suggest a coding conflict and I would love to know how to resolve it.

kind regards
  •  

ColinM

Finlay,
I will try to reproduce your steps on XAMPP with PHP 8.1.7
Which version of jD are you using?  Note jD 4.0.37 was withdrawn
Colin
Colin M
  •  

Finlay

Hi Colin

That's kind of you. I'll be interested to see if you get a similar error.

I'm using 'jDownloads Version 4.0.36 Stable - Date: 2023-10-24' which I DL'd from the JD site a few days ago. Is there a later stable version?

Kind regards
  •  

Finlay

Hi Colin

Did you have any success in recreating the error messages?

Kind regards
  •  

ColinM

Finlay
Set up an XAMPP site with Joomla! 4.4.0, jD 4.0.36, which is the most recent version, and PHP 8.2.4. 
It did not reproduce the layouts challenge as you have found. So now I am at a loss - probably something else

Colin
Colin M
  •  

Finlay

Thanks, Colin.

Perhaps it's the PHP version which is flagging the errors. I'll experiment.
  •