Page 1 of 2

Upgrading any phoca extension....

Posted: 22 Jul 2009, 09:22
by ep98
from low version to higher returns error
I'm wondering why u not make it in more simple way, like Remository or jDownloads, simple uninstall/install procedure

[code]
Phoca Download was not successfully upgraded:
Table 'addonsbg.jos_phocadownload' doesn't exist SQL=SELECT * FROM `jos_phocadownload` LIMIT 1;
Table 'addonsbg.jos_phocadownload_categories' doesn't exist SQL=SELECT * FROM `jos_phocadownload_categories` LIMIT 1;
Table 'addonsbg.jos_phocadownload_sections' doesn't exist SQL=SELECT * FROM `jos_phocadownload_sections` LIMIT 1;
Error while updating DIRECTLINK columnError while updating Confirm License column
Error while updating Display Unaccessible Files column
Error while updating Date column (categories)
Error while updating Date column (sections)
Error while updating Filename Preview column
Error while updating Filename Play column
Error while updating Image Filename Spec1 column
Error while updating Image Filename Spec2 column
Table 'addonsbg.jos_phocadownload' doesn't exist SQL=SELECT * FROM `jos_phocadownload` LIMIT 1;
Table 'addonsbg.jos_phocadownload_categories' doesn't exist SQL=SELECT * FROM `jos_phocadownload_categories` LIMIT 1;
Table 'addonsbg.jos_phocadownload_sections' doesn't exist SQL=SELECT * FROM `jos_phocadownload_sections` LIMIT 1;
[/code]

This tables exists, otherwise 1.1.0 will not work, right ?

Phoca extensions keeps add database name as prefix, there can't be such thing like:
databasename.prefix_tablename

PHP Info
[code]
PHP Built on: Linux ns1.smartcall.bg 2.6.18-128.1.10.el5PAE #1 SMP Thu May 7 11:14:31 EDT 2009 i686
Database Version: 5.0.45
Database Collation: utf8_general_ci
PHP Version: 5.2.6
Web Server: Apache/2.2.3 (CentOS)
Web Server to PHP interface: cgi-fcgi
Joomla! Version: Joomla! 1.5.12 Stable [ Wojmamni Ama Woi ] 01-July-2009 02:00 GMT
User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10) Gecko/2009051221 Firefox/3.0.10
[/code]

in addition I've tried to upgrade Phoca Gallery 2.0.2 to 2.5.0 Final on hostmonster.com

[code]
Phoca Gallery not successfully upgraded:
Error while updating HITS columnError while updating Extlink1 columnError while updating Extlink2 columnError while updating Date columnError while updating Geotitle (Category) columnError while updating Zoom (Category) columnError while updating Longitude (Category) columnError while updating Latitude (Category) columnError while updating Userfolder columnError while updating Deleteuserid columnError while updating Uploaduserid columnError while updating Accessuserid columnError while updating Geotitle columnError while updating Zoom columnError while updating Longitude columnError while updating Latitude columnError while updating Video Code columnError while updating VirtueMart Product ID columnTable 'cmsbginf_cmsbg.jos_phocagallery' doesn't exist SQL=SELECT * FROM `jos_phocagallery` LIMIT 1;
Table 'cmsbginf_cmsbg.jos_phocagallery_categories' doesn't exist SQL=SELECT * FROM `jos_phocagallery_categories` LIMIT 1;
[/code]

Same shit like Phoca Download, the only difference is that the error report is not formated.

PHP Info

[code]
PHP Built on: Linux host200.hostmonster.com 2.6.28-9.16.intel.BHsmp #1 SMP Sat Apr 18 11:41:59 MDT 2009 x86_64
Database Version: 5.0.75-community-log
Database Collation: utf8_general_ci
PHP Version: 5.2.9
Web Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Web Server to PHP interface: cgi-fcgi
Joomla! Version: Joomla! 1.5.12 Stable [ Wojmamni Ama Woi ] 01-July-2009 02:00 GMT
User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10) Gecko/2009051221 Firefox/3.0.10
[/code]

Re: Upgrading any phoca extension....

Posted: 23 Jul 2009, 22:36
by Jan
Hi,

how did you upgrade. The old version should not be uninstalled. New should be installed (upgraded) without uninstalling old version.

Check if the tables are in your database (e.g. via phpMyAdmin)

if you have problems with automatically upgrading, then try to upgrade manually.

All files needs to be copied and sql queries (only update) need to be run manually (via e.g. phpMyAdmin) see:

https://www.phoca.cz/documents/2-phoca-g ... em-solving

Moslty such message is displayed in case you click on upgrade but no old tables are here :idea:

Jan

Re: Upgrading any phoca extension....

Posted: 26 Jul 2009, 21:35
by ep98
1. Uninstall the component
2. Install the new one
(from the joomla installer)
3. Click Upgrade button
4. Errors comes up

[quote]
Check if the tables are in your database (e.g. via phpMyAdmin)
[/quote]

They're, but without the table name.

[quote]
Table 'addonsbg.jos_phocadownload' doesn't exist SQL=SELECT * FROM `jos_phocadownload` LIMIT 1;
[/quote]

the right one is

jos_phocadownload' doesn't exist SQL=SELECT * FROM `jos_phocadownload` LIMIT 1;

with addonsbg. in front cant exist

Re: Upgrading any phoca extension....

Posted: 27 Jul 2009, 15:01
by Jan
Hi,

Please let me know where did you get information about 1)

Obsolete Phoca Gallery should NOT be uninstalled before upgrading, see Important here:

https://www.phoca.cz/documents/2-phoca-g ... ca-gallery

Jan

Re: Upgrading any phoca extension....

Posted: 29 Jul 2009, 11:38
by ep98
Even with keeping component installed (2.0.0) and upgrading to 2.5.2 or 2.5.2 to 2.5.2, the upgrade script keeps add the name of the database in front of each table name.

And this happen only to Phoca Extensions, Remository upgrades without a problem, jDownloads upgrades without a problem, Kunena forum upgrades without a problem, but not and Phoca

In addition I've made some searches on Remository upgrade script (this extension do not add the db name as prefix)

in Remo 3.52.6

[code]
$database->setQuery("SELECT COUNT(*) FROM #__permissions");
if (0 == $database->loadResult()) {
$database->setQuery("INSERT INTO #__permissions(SELECT 0 , 'Nobody', 2, 'edit', 'remosFolder', id, 0 FROM #__downloads_containers)");

[/code]

in Phoca Download (probably and others) the same procedure looks a bit different

[code]
$query=' SELECT * FROM `'.$dbPref.'phocadownload_categories` LIMIT 1;'."\n";
[/code]

both queries are a bit different
in the first there is a mark that table has a prefix, in the second, this mark is missing and SELECT * FROM `'.$dbPref.'phocadownload_categories`probably adds db name as additional prefix.

My sql experience is low yet, but I can't assume that everything else under joomla upgrades without any problems, but not and yours extensions.

The update script should be added as a option for current mySQL structure, eg. 2.4.x shares same DB structure, so they're dont need Upgrade (moving, renaming, dropping DB tables), Upgrade from 2.1.x to 2.4.x and Fresh Install. But the best way is the one currently created by Mambo and overtaken by Joomla - Uninstall the existing version, Installing the new one, built in scenario for upgrading the DB - without reading tons of useless documentation about how to manually update db tables.

Offtopic:
Why all tags such as code, quote doesnt work here ?

Re: Upgrading any phoca extension....

Posted: 29 Jul 2009, 13:04
by Jan
Hi,
offtopic
- you need ot enable it in your profile or (if disabled) you need to enable it below the topic form - Options - Disable BBCode

Upgrade script which is used in Phoca extension is here, becasue most of people help such upgrade script. You will install some version e.g. of Phoca Gallery and if there is a new version, you need not to uninstall, just install new version and the upgrade script will detect if some changes should be done in database or not. The best advantage is, you can upgrade without knowing your version. It means you have e.g. 1.8.0 version. You need not to upgrade to 1.9.0, then to 2.0.0 then to 2.2.4 etc. You need not to find different upgrade scripts like script 1.8.0 - 2.2.4, 1.8.0 - 2.5.0, etc. So the idea is OK, the problem is in some error which is caused by sql queriing

If you have this code:
$query=' SELECT * FROM `'.$dbPref.'phocadownload_categories` LIMIT 1;'."\n";
the dbPref contain your prefix, e.g. jos_
and will add it here so you get:
$query=' SELECT * FROM `jos_phocadownload_categories` LIMIT 1;'."\n";

Because I don't get any errors on my all test servers (winxp, freebsd, suse linux), it will be helpful for me, if someone who has such problems will test it and let me know what exactly do the problems

Please, will be great to help fix such problems if you will change the code to:
$query=' SELECT * FROM `#__phocadownload_categories` LIMIT 1;'."\n";
and you will test it with #__ If this will be working, then I can change it

Jan

Re: Upgrading any phoca extension....

Posted: 30 Jul 2009, 09:09
by ep98
[quote]
you will test it with #__ If this will be working, then I can change it
[/quote]

now is ok, and updates without a problems

tested with Gallery 2.5.0 to 2.5.2 and Download 1.1.0 to 1.2.0 Beta

Re: Upgrading any phoca extension....

Posted: 17 Jun 2010, 17:57
by Bob53207
I put myself in a real pickle. Upgrading a site for my favorite non-profit from J1.5.14 to 1.5.18, the first thing I then wanted to upgrade was Phoca Gallery Component. I *believe* it was at 2.52 and I installed 2.7.2. Accidentally, I hit the "Install" instead of the "Upgrade" button. This caused all of the galleries to go away on the site. I uninstalled, reinstalled and "Upgraded" and the result of the upgrade was:

Phoca Gallery not successfully upgraded:
Error while updating HITS columnError while updating Extlink1 columnError while updating Extlink2 columnError while updating Date columnError while updating Geotitle (Category) columnError while updating Zoom (Category) columnError while updating Longitude (Category) columnError while updating Latitude (Category) columnError while updating Userfolder columnError while updating Deleteuserid columnError while updating Uploaduserid columnError while updating Accessuserid columnError while updating Geotitle columnError while updating Zoom columnError while updating Longitude columnError while updating Latitude columnError while updating Video Code columnError while updating VirtueMart Product ID columnError while updating Image Original Size columnError while updating Owner ID columnError while updating Approved(Categories) columnError while updating Approved(Images) columnError while updating External Image Id columnError while updating External Large Image columnError while updating External Medium Image columnError while updating External Small Image columnError while updating External Image Width columnError while updating External Image Height columnError while updating External Image Original columnError while updating External Id (Category) columnError while updating External Image Album columnError while updating External Image User columnError while updating Metakey columnError while updating Metakey column (Categories)Error while updating MetaDescription columnError while updating MetaDescription column (Categories)Error while updating External Image Album - Auth columnTable 'AOMS.jos_phocagallery' doesn't exist SQL=SELECT * FROM `jos_phocagallery` LIMIT 1;
Table 'AOMS.jos_phocagallery_categories' doesn't exist SQL=SELECT * FROM `jos_phocagallery_categories` LIMIT 1;


I am NOT a database guy, but I managed to use phpMyAdmin to see that there is no AOMS.jos_phocagallery table. The jos_phocagallery_categories table looks like it should, however no categories are showing in the back-end.

Visiting [url]http://angelonmyshoulder.org/aoms-photos.html[/url] gives the following error message:

Warning: Invalid argument supplied for foreach() in /home/content/a/o/m/aoms2008/html/components/com_phocagallery/models/categories.php on line 158
AOMS Photo Galleries

There exists a SQL back-up from a couple months back that is Phoca 2.5.? and J1.5.14. Is there anything I can do to use that to fix the installation of 2.7.2 on J1.5.18? This is a time of year the site gets the most traffic and the Phoca Galleries are the key. Please, please help.

Thanks,
Bob

Re: Upgrading any phoca extension....

Posted: 17 Jun 2010, 23:41
by Jan
Hi, you can only upgrade if there is a previous version, If you have installed new version and added no new data, there will be no new data (because they were removed while installation).

Did you read the documentation with the warning:
https://www.phoca.cz/documents/2-phoca-g ... ca-gallery
Then you can choose between Install or Upgrade Phoca Gallery component. Select Upgrade. If you select Install, all previously stored Phoca Gallery data in your database will be removed.
Jan

Re: Upgrading any phoca extension....

Posted: 18 Jun 2010, 14:39
by Bob53207
I know I messed-up hitting the "Install" button rather than "Upgrade". Some of the data (ie: categories) seems to still be in the database. Is there any way I can re-insert the rest of the data to get this working again?

Thanks,
Bob