Cannot redeclare class PhocaDownloadLayout

Phoca Download - download manager
docdunning
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 08 Aug 2009, 16:36

Cannot redeclare class PhocaDownloadLayout

Post by docdunning »

Just upgraded to PD 3.0.3 on Joomla 3.2.1

I have several menu options set to "List of Files (Category View)". If the PD category has some descriptive text, it is supposed to be displayed at the top of the list of files, but instead I get this:
Fatal error: Cannot redeclare class PhocaDownloadLayout in xxxxx\components\com_phocadownload\helpers\phocadownloadlayout.php on line 13
If I remove the text in the PD category description, then no problem. Add the description back in and the error occurs.

I haven't checked in the code yet, but this looks like it could be a bug ... ?
docdunning
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 08 Aug 2009, 16:36

Re: Cannot redeclare class PhocaDownloadLayout

Post by docdunning »

Been looking at the code, and the error is caused in \components\com_phocadownload\views\category\tmpl\default.php

The code is as follows:

Code: Select all

			// Description
			/*if ($l->isValueEditor($this->category[0]->description)) {
				echo '<div class="pd-cdesc">'.$this->category[0]->description.'</div>';
			}*/
			
			// Description
			 if ($l->isValueEditor($this->category[0]->description)) {
				echo '<div class="pd-cdesc">';
				echo JHTML::_('content.prepare', $this->category[0]->description);
				echo '</div>';
			 }
I've reversed the comments on these two blocks, so that it uses the first one instead of the second, and now it works without trying to redeclare PhocaDownloadLayout.

Any idea what the problem is, though?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48568
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Cannot redeclare class PhocaDownloadLayout

Post by Jan »

Hi, hmm, I don't understand? Both codes are the some regarding the redeclaring the class. No one of both sets the class :idea:

Jan
If you find Phoca extensions useful, please support the project
docdunning
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 08 Aug 2009, 16:36

Re: Cannot redeclare class PhocaDownloadLayout

Post by docdunning »

Hi Jan - OK, I'll do some more testing. It does seem odd, as you say ...
docdunning
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 08 Aug 2009, 16:36

Re: Cannot redeclare class PhocaDownloadLayout

Post by docdunning »

OK, I've solved this one. I was still using the old J2.5 version of the PhocaDownload Plugin. I've now installed the correct plugin for J3.0, and I don't get the error.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48568
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Cannot redeclare class PhocaDownloadLayout

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply