Upgrade from 2.7.x to 3.0 not working - should it?

Phoca Gallery - image gallery extension
fawkes
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 30 Mar 2011, 23:29

Upgrade from 2.7.x to 3.0 not working - should it?

Post by fawkes »

Hi,
thanks for all the great work, I really love the phoca gallery.
I have to migrate to Joomla 1.6 rather quickly, and I am therefore experimenting with phoca gallery 3.0.
The new "JUpgrade" component (v1.1.0) also copies the existing component tables in the migration process; therefore I thought I'd try the "Upgrade" option during phoca gallery installation process. However it doesn't yet seem to work; in category view, only the following warnings show up instead of the actual categories:

Code: Select all

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in [..]/libraries/joomla/database/database/mysql.php on line 317
Call Stack
#	Time	Memory	Function	Location
1	0.0020	710848	{main}( )	../index.php:0
2	0.3921	7259472	JAdministrator->dispatch( )	../index.php:47
3	0.4245	8516648	JComponentHelper::renderComponent( )	../application.php:154
4	0.4669	9066536	require_once( '[..]/administrator/components/com_phocagallery/phocagallery.php' )	../helper.php:152
5	0.5073	9677144	JController->execute( )	../phocagallery.php:35
6	0.5073	9677280	PhocaGalleryCpController->display( )	../controller.php:649
7	0.5073	9677280	JController->display( )	../controller.php:184
8	0.5626	10863816	PhocaGalleryCpViewPhocaGalleryCs->display( )	../controller.php:616
9	0.5657	10885672	JView->get( )	../view.html.php:27
10	0.5657	10885976	JModelList->getPagination( )	../view.php:365
11	0.5703	11166696	JModelList->getTotal( )	../modellist.php:165
12	0.5818	11193216	JModel->_getListCount( )	../modellist.php:213
13	0.5828	11169000	JDatabaseMySQL->getNumRows( )	../model.php:268
14	0.5828	11169240	mysql_num_rows ( )	../mysql.php:317

( ! ) Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in [..]/libraries/joomla/database/database/mysql.php on line 317
Call Stack
#	Time	Memory	Function	Location
1	0.0020	710848	{main}( )	../index.php:0
2	0.3921	7259472	JAdministrator->dispatch( )	../index.php:47
3	0.4245	8516648	JComponentHelper::renderComponent( )	../application.php:154
4	0.4669	9066536	require_once( '[..]/administrator/components/com_phocagallery/phocagallery.php' )	../helper.php:152
5	0.5073	9677144	JController->execute( )	../phocagallery.php:35
6	0.5073	9677280	PhocaGalleryCpController->display( )	../controller.php:649
7	0.5073	9677280	JController->display( )	../controller.php:184
8	0.5626	10863816	PhocaGalleryCpViewPhocaGalleryCs->display( )	../controller.php:616
9	0.5657	10885672	JView->get( )	../view.html.php:27
10	0.5657	10885976	JModelList->getPagination( )	../view.php:365
11	0.5837	11169032	JModelList->getstart( )	../modellist.php:165
12	0.5839	11169416	JModelList->getTotal( )	../modellist.php:244
13	0.5843	11170552	JModel->_getListCount( )	../modellist.php:213
14	0.5852	11170600	JDatabaseMySQL->getNumRows( )	../model.php:268
15	0.5852	11170840	mysql_num_rows ( )	../mysql.php:317
and similar for images:

Code: Select all

( ! ) Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in [..]/libraries/joomla/database/database/mysql.php on line 317
Call Stack
#	Function	Location
1	{main}( )	../index.php:0
2	JAdministrator->dispatch( )	../index.php:47
3	JComponentHelper::renderComponent( )	../application.php:154
4	require_once( '[..]/administrator/components/com_phocagallery/phocagallery.php' )	../helper.php:152
5	JController->execute( )	../phocagallery.php:35
6	PhocaGalleryCpController->display( )	../controller.php:649
7	JController->display( )	../controller.php:184
8	PhocaGalleryCpViewPhocaGalleryImgs->display( )	../controller.php:616
9	JView->get( )	../view.html.php:28
10	JModelList->getItems( )	../view.php:365
11	JModelList->getstart( )	../modellist.php:118
12	JModelList->getTotal( )	../modellist.php:244
13	JModel->_getListCount( )	../modellist.php:213
14	JDatabaseMySQL->getNumRows( )	../model.php:268
15	mysql_num_rows ( )	../mysql.php:317

( ! ) Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in [..]/libraries/joomla/database/database/mysql.php on line 317
Call Stack
#	Function	Location
1	{main}( )	../index.php:0
2	JAdministrator->dispatch( )	../index.php:47
3	JComponentHelper::renderComponent( )	../application.php:154
4	require_once( '[..]/administrator/components/com_phocagallery/phocagallery.php' )	../helper.php:152
5	JController->execute( )	../phocagallery.php:35
6	PhocaGalleryCpController->display( )	../controller.php:649
7	JController->display( )	../controller.php:184
8	PhocaGalleryCpViewPhocaGalleryImgs->display( )	../controller.php:616
9	JView->get( )	../view.html.php:29
10	JModelList->getPagination( )	../view.php:365
11	JModelList->getTotal( )	../modellist.php:165
12	JModel->_getListCount( )	../modellist.php:213
13	JDatabaseMySQL->getNumRows( )	../model.php:268
14	mysql_num_rows ( )	../mysql.php:317

( ! ) Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in [..]/libraries/joomla/database/database/mysql.php on line 317
Call Stack
#	Function	Location
1	{main}( )	../index.php:0
2	JAdministrator->dispatch( )	../index.php:47
3	JComponentHelper::renderComponent( )	../application.php:154
4	require_once( '[..]/administrator/components/com_phocagallery/phocagallery.php' )	../helper.php:152
5	JController->execute( )	../phocagallery.php:35
6	PhocaGalleryCpController->display( )	../controller.php:649
7	JController->display( )	../controller.php:184
8	PhocaGalleryCpViewPhocaGalleryImgs->display( )	../controller.php:616
9	JView->get( )	../view.html.php:29
10	JModelList->getPagination( )	../view.php:365
11	JModelList->getstart( )	../modellist.php:165
12	JModelList->getTotal( )	../modellist.php:244
13	JModel->_getListCount( )	../modellist.php:213
14	JDatabaseMySQL->getNumRows( )	../model.php:268
15	mysql_num_rows ( )	../mysql.php:317
Is this supposed to work already, or is this something not yet implemented? Or is it not supposed to work at all?
My guess would be that the database doesn't get upgraded properly? Because when I "Install" the component and copy the records over from the old tables manually, it seems to work quite fine.
Maybe there's already a quick solution for it? If not I'll probably will try to take a look into it how it can be fixed, since if that worked, it would be a really cool thing in my eyes.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Upgrade from 2.7.x to 3.0 not working - should it?

Post by Jan »

Hi, upgrade means, you can upgrade from some verstion to some future version, but the start version is 3.0.0 Stable (it is not ready yet), so if there will be 3.0.1 the upgrade will work 100% (Between RC versions, there is nothing to upgrade for now)

There is for now no upgrade from 2.7 to 3.0 possible as both component are completely different like Joomla! 1.5 is completely different to 1.6 (inside - many changes, no backward compatibility, etc.) So for now I didn't find time to make some upgrade function as 1.6 is really very different :-( :-( (spent 1.5 of year with overwriting the components to 1.6).

But as in Phoca Gallery, there is Multiple Add function, it should be not difficult to move the images with their folder structure to your 1.6 and make the gallery with multiple add function.

Jan
If you find Phoca extensions useful, please support the project
weissbrot
Phoca Member
Phoca Member
Posts: 22
Joined: 07 Jun 2008, 19:18

Re: Upgrade from 2.7.x to 3.0 not working - should it?

Post by weissbrot »

Hy Jan,

long time no see :)

so i just made a testing environment (1:1 copy of the original site) for my site and also tried to upgrade from J1.5 to J1.6 -> now i have the same problem as the thread starter.

How do i get >150 Categories to the new Phocagallery? i just dont want to manually create 150 categories. Do you think a SQL - Query could solve this problem? both sites (1.5 and 1.6) and DBs are on the same server.

the connection between the categories and the folders wouldnt be the problem, but creating the categories would be annoying...

thanks a lot!
weissbrot
Phoca Member
Phoca Member
Posts: 22
Joined: 07 Jun 2008, 19:18

Re: Upgrade from 2.7.x to 3.0 not working - should it?

Post by weissbrot »

so i just copied all the information stored in:
- jos_phocagallery
- jos_phocagallery_categories

into:
- j16_phocagallery
- j16_phocagallery_categories

and i can already see the thumbnails and categories, but when i want to see the image i get the Error:
#404 PHOCAGALLERY_CATEGORY_IS_UNPUBLISHED
i tried to publish and authorize the categories in the backend, but no change -> any ideas?
weissbrot
Phoca Member
Phoca Member
Posts: 22
Joined: 07 Jun 2008, 19:18

Re: Upgrade from 2.7.x to 3.0 not working - should it?

Post by weissbrot »

GOOD NEWS PEOPLE :)

i just finished porting my pictures & galleries from J1.5 (Phoca Gallery 2.7.8 ) to J1.6 (Phoca Gallery 3.0.0RC5)!

i have >150 Galleries with thousands of pictures :)

So like i mentioned before i copied all content from the old DB:
- jos_phocagallery -> j16_phocagallery
- jos_phocagallery_categories -> j16_phocagallery_categories

i used the function of phpmyadmin to export the content from those tables into .sql files. After that i opened them with notepad and deleted the part "CREATE TABLE jos_phocagallery...." -> THIS IS IMPORTANT! otherwise you would either overwrite the table or nothing will happen at all :)

Then i changed all occurences of "jos_phocagallery" (old Table) into "j16_phocagallery" (new Table) and imported the sql into my DB. this copies the Picture Information! You also have to this with your jos_phocagallery_categories table!

To get rid of my Nasty 404 Error when i clicked on a picture i just had to make a new Menu Item that links to the Phoca Gallery as mentioned in the FAQ from Jan

i hope this helps other guys -> or you @jan for developing an upgrade solution :)

cheers weissbrot

ps: to make this work you will also have to make an exact copy of the folder structure from your old site onto your new site!
fawkes
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 30 Mar 2011, 23:29

Re: Upgrade from 2.7.x to 3.0 not working - should it?

Post by fawkes »

Thanks weissbrot!
What you're describing is a detailled version of what I basically meant by "copy the records over from the old tables". That works quite nice, although sometimes a litte fine-tuning seems to be required here and there afterwards (a user wasn't able to upload images right away, I had to play around with category/user folders to get it working). I'll follow that path in my productive system too.
weissbrot
Phoca Member
Phoca Member
Posts: 22
Joined: 07 Jun 2008, 19:18

Re: Upgrade from 2.7.x to 3.0 not working - should it?

Post by weissbrot »

you are welcome :)

btw: you could mark the thread as solved
bzahn
Phoca Member
Phoca Member
Posts: 30
Joined: 30 Jan 2009, 22:43

Re: Upgrade from 2.7.x to 3.0 not working - should it?

Post by bzahn »

Weissbrot,

I just used jupgrade to migrate from Joomla 1.5 to 1.6 and am having the same problems with my Phoca Gallery. I am new to the database part of such a migration, so I am not sure how much of the "CREATE TABLE jos_phocagallery...." I need to delete in order to prepare it for importation. An you clarify for a db beginner, please?
weissbrot
Phoca Member
Phoca Member
Posts: 22
Joined: 07 Jun 2008, 19:18

Re: Upgrade from 2.7.x to 3.0 not working - should it?

Post by weissbrot »

you only need all the insert statements, so you can remove the whole part from Create Table :)
bzahn
Phoca Member
Phoca Member
Posts: 30
Joined: 30 Jan 2009, 22:43

Re: Upgrade from 2.7.x to 3.0 not working - should it?

Post by bzahn »

Vielen Dank! Jetzt klappt es.
Post Reply