[Drupal][SOLVED] Cover photo missing when updating Drupal Node Gallery module from 6.x-2.0 to 6.x-3.2
The Node Gallery module is one of the best options available to create multimedia galleries where both the galleries and the gallery items are nodes. The latest module version for drupal 6.x is 3.2. If you are trying to update the module from 2.0 to 3.2 you will find some issue with the cover photo of galleries. The cover photos won't come up after the update. Read on to know how solve the issue after the Node Gallery update
To fix this issue I first analysed the database schema of the two versions of the module and found a large change in the schema structure. The 3.2 version schema is entirely different from the previous version. Later I checked the query status during the update.php run, and found that some queries are failing during the process. So I started investigating on this, and found that the database schema in the .install file for 'node_gallery_galleries' has some extra fields like 'img_count', 'pub_img_count'. so you just need to remove these fields for the schema and run update.php. Now you can see that the update.php is successfully executed without any failed queries.
Now almost half the part is done. The views API's of the 2 module version also have some good difference. So if you are using some view to display the list of galleries you will find that the cover photo is missing. This is because the cover photo concept is entirely different in the new module version. You can get the cover photo in the view by adding the relationship 'cover photo' in the view and use this relationship to display the image field.
In short the issues with the node_gallery updation is mainly because of the difference in the view api's of both versions. Also the bug in the install file caused some issues.