How i can upgrade node_gallery from 1.0 to 2.0?
I have big problem with many galleries on my web-portal and i have:
1. if i upgrade imagecache from ImageCache 6.x-2.0-beta9 to ImageCache 6.x-2.0-beta10, node_gallery 1.0-alpha8 not work!
2. If i setup new version node_gallery 2.0-alpha9 i not see galleries from 1.0 version.

Please help me with this problem.

Comments

Mascher’s picture

Component: Documentation » Code
dbeall’s picture

Component: Code » Miscellaneous
Priority: Critical » Normal

a quote from dddave

With the words of mighty merlinofchaos: "There are no critical support requests!" ;)

Someone may have some steps to do this.
According to what I have learned about 2.0, there is no upgrade from 1.0 to 2.0 because the module has had a complete re-write.
I know this is no help to you and I may be wrong...

I am sure some people will add some comments to this thread if it can be done.
And if there is steps to do this, I need to document the process for others.

Mascher’s picture

I locate the problem! If you create a gallery with the name in Latin letters, node_gallery 1.0-alpha8 normally works with ImageCache 6.x-2.0-beta10. If you create a gallery named in Cyrillic, image galleries are not shown. Module imagecache not work with module transliteration propertly... If i disable module transliteration, all work fine but i have Cyrillic path to preset image, i not like this.

And about update nodegallery. You plane create script for move gallery from old version to new? How i can do this?
I have 100 galleries on node_gallery 1.0-alpha8 and i want install node_gallery 2.0-alpha9 and see all my galleries. Can u help me?

dbeall’s picture

Title: Node Gallery update from 1.0-alpha8 to 2.0-alpha9 » Node Gallery upgrade from 1.0-alpha8 to 2.0-alpha9
Assigned: Mascher » Unassigned

You may want to submit an issue about Cyrillic in the transliteration module issue que.

-- node_gallery upgrade process --
I remember seeing some information about no upgrade, but I can't find it now.
I am not the developer or maintainer for node_gallery....
Someone that is a php/sql pro, could probably write a script to alter the database.
I would like to know that myself so it can be documented and available for people to use.
I am sure others will be asking about it.

redsky’s picture

subscribing...

I'm still in v1 as well because of existing photo galleries. I've stopped allowing my users to upload photos so I don't compound the problem while I wait to see where v2 goes.

Tally’s picture

How many galleries and pics do you have in the old version?

Unless you have thousands of galleries you can always brute force it. It is not fun, it is not glamorous, but it is often the easiest and quickest way - unless you can afford to pay someone to write custom code for you.

I moved from a totally different gallery module to Node Gallery. I had over 100 galleries and almost a thousand pics.

It took me about 4 hours to move them all. I had a local backup that I used for uploading the images. I copied the text from a backup/test copy of the site to the new galleries and image pages.

My previous gallery module did not allow comments, so that was not a factor. If you have comments that you want to keep, you could always write a query to update the nid in the comment table.

Mascher’s picture

> How many galleries and pics do you have in the old version?
more than 100
and its users galleries with 200-300 comments and raitings...

> Unless you have thousands of galleries you can always brute force it. It is not fun, it is not glamorous, but it is often the easiest
> and quickest way

I think it's not a way :)

> - unless you can afford to pay someone to write custom code for you.

I think the creators of Node Gallery will be much easier and more correct to write a script to update Node Galllery version.
Many people are having this same problem.

kmonty’s picture

You could write some queries to change your database schema and it should work just fine. I'm too busy to work on this and I know Wilson does not care about version 1, but if you write anything, please submit your work here!

janis_lv’s picture

oh, I wish I'd read this before upgrading :[

dbeall’s picture

Title: Node Gallery upgrade from 1.0-alpha8 to 2.0-alpha9 » Node Gallery upgrade from version 1.0 to 2.0

added to handbook front page(known issues) and FAQ until code is contributed.

dbeall’s picture

Title: Node Gallery upgrade from version 1.0 to 2.0 » SQL queries needed to upgrade Node Gallery from version 1.0 to 2.0
Component: Miscellaneous » Code
Category: support » task

Change title to better reflect issue and attention of coders

Tally’s picture

@ janis_lv - "oh, I wish I'd read this before upgrading :["

This may be a bit late for you, but it is good practice to always install updates and upgrades on a test site before making changes to a production site. Installing updates on a test site allows you to verify what has changed and if anything unexpected occurs.

See Create a Test Site and related pages for best practices related to updating a site.

redsky’s picture

Tally, In my case, the brute force option is likely best. A couple of hours likely.

Mascher’s picture

Anyone engaged in writing a SQL script to update Node Gallery from version 1.0 to 2.x? It is very important for me!

I am willing to pay money for writing the script to update NodeGallery!

Mascher’s picture

I have script for update node_gallery from 1.x to 2.x contact me if u want this script.

dbeall’s picture

I guess the best thing to do is post it here so it will be available to others. We can put links to it from the project page and the handbook.

kmonty’s picture

yeah can you save it as a zip/tar file? That would be huge!

Mascher’s picture

I can only say what u must do for upgrade :)
We pay for this patch 50$ :)

For upgrate from node_gallery 6.x-1.0-alpha8 to node_gallery 6.x-2.0-alpha12 (imagecache 6.x-2.0-beta8 to imagecache 6.x-2.0-beta10) you must:

0. Backup you FILES and DATABASE before UPDATE!!!

1. Go to admin -> modules
2. Disable imagecache and node gallery modules
3. Delete old modules folders from /site/all/modules (node_gallery and imagecache folders)
4. Copy new version of node_gallery and imagecache modules folders to /site/all/modules
5. Go to admin -> modules and enable new imagechache and node gallery modules.
6. Create drupal_node_galleries tabe in database:

CREATE TABLE IF NOT EXISTS `drupal_node_galleries` (
  `gid` int(10) unsigned NOT NULL default '0',
  `nid` int(10) unsigned NOT NULL default '0',
  `fid` int(10) unsigned NOT NULL default '0',
  `weight` smallint(6) default '0',
  `is_cover` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`nid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8

7. Copy all drupal_ng_images table records to drupal_node_galleries table.
8. run update.php script (end with any not critical errors and delete you old version Gallery Relationship)
9. go to admin - Node gallery and "Add a Gallery Relationship" with name of you old Node Gallery version Relationship.

If you not have galleries with utf-8 chars in gallery name(or if you not tave transliterate module) you can see all old galleries in new module. Good Luck.

If you have utf-8 names in gallery name you must rename all files paths on FS (/sites/default/files/ ... where you save imagecache presets images) and fild "filepath" in table drupal_files to transliterate.
Old version of imagecache not work with transliterate module and write utf-8 names in database and FS directly without transliterate...

artbody’s picture

Version: 6.x-1.0-alpha8 » 6.x-2.0-beta2

Special Tanks @ Mascher

I hope one of the dev's put this Information in the update INFO
it cost me a hole day to find this updateissue

dddave’s picture

Version: 6.x-2.0-beta2 » 6.x-1.0-alpha8
Status: Active » Fixed
Issue tags: +Needs documentation

Resetting version, correcting status, adding tag

dbeall’s picture

Reference

From the handbook front page
Node_Gallery: Photo Gallery management for your website

Known Issues
There is no upgrade from version 1.0 to version 2.0 available at this time. Some Sql Queries will need to be contributed to change the database schema for this task and it should work just fine. See this issue.(points here)

Status: Fixed » Closed (fixed)
Issue tags: -node gallery, -Needs documentation, -update

Automatically closed -- issue fixed for 2 weeks with no activity.