Upgrade Info - videocode

Phoca Gallery - image gallery extension
BDierks
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 27 Mar 2012, 22:28

Upgrade Info - videocode

Post by BDierks »

Hello,
I just upgraded one of my client's sites from Joomla 1.5 to 2.5 along with the Phoca Gallery from 2.7.7 to 3.1.5.
During the database table update, the table #__phocagallery ended up with the videocode set to "0" instead of NULL.

This caused the incorrect template to be used (default_video) instead of displaying the default detail template. The indication was that instead of an image, it displayed a "0".

After identifying the problem, I went through and found that in components/com_phocagallery/views/detail/view.html.php - line 296 - the code checks to see if $item->videocode is set, and is not blank. Since it was set to "0" in the database, it was set, and displayed the video template. I have updated the code to check for a "0", as well as setting NULL in the database.

Just thought I'd post this in case someone else bumps into this following an upgrade. (Or if I forget about it and it happens again)

-Brian
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Upgrade Info - videocode

Post by Jan »

Hi, please let me know the code link and file where you have find the checking for if videocode is set - so I can test it and add e.g. some additional clause.

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