Steps taken:
- Fresh install of Drupal 5.0
- latest image and views modules installed
- OG Group module installed
- A group created sucessfully
- OG galleries installed and setup to use default view
- first gallery created (automatically with other 'public' gallery)
- first image uploaded sucessfully into group gallery via 'create image' link in group details block
Any subsequent access to the main 'Create content' link (or any 'create' link) immediately gives three warnings:
* warning: Invalid argument supplied for foreach() in C:\webroot\drupal5\modules\node\node.module on line 510.
* warning: implode() [function.implode]: Bad arguments. in C:\webroot\drupal5\modules\node\node.module on line 514.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM drupal5_node n INNER JOIN drupal5_users u ON u.uid = n.uid INNER JOIN drupal5_node_revisions r ON r.vid = n.vid WHERE in C:\webroot\drupal5\includes\database.mysql.inc on line 167.
After disabling the OG-Galleries module the warnings do not appear but reappear as soon as this module is re-enabled.
I have inserted the php debugging snippet to create a backtrace entry in the watchdog log - see attached a text file.
Probably a separate issue:
Steps taken:
- deleted group gallery - leaving the automatically created public-main gallery
- creater a new image and added thsi to the public-main gallery
- two links to the same public-main gallery now appear in the 'og-galleries' block
Any help in sorting these out would be appreciated :-)
| Comment | File | Size | Author |
|---|---|---|---|
| og_galleries_trackback.txt | 22.65 KB | johns20 |
Comments
Comment #1
karens commentedTry this:
1) update to the very latest version (not the official release on the project page, either from cvs or pick up tomorrow's development snapshot after today's changes are in it).
2) uninstall OG Galleries on the 'modules' page. That will turn it off so you can run the uninstall script.
3) go to the 'uninstall' link on the modules page and check the box to completely uninstall OG Galleries. That will remove all the settings and vocabularies it created. It will not delete your data, just unlink your nodes from any galleries.
4) reinstall the module on the modules page.
5) try again and see if you still have problems.
6) if so, please paste an export of your galleries view for me to look at.
Comment #2
johns20 commentedI tried the CVS version as suggested but this only gave error mesages as well - sorry but I didn't record these.
I've since installed Drupal 5.1 as an update to a copy of my running 4.7 site (after disabling all modules etc.) and have installed the latest modules replacing (most) of those I had running. I installed the latest OG and OG_galleries releases and the same 3 warning messages appear as before after clicking on any link to node/add :
* warning: Invalid argument supplied for foreach() in C:\webroot\update\cms\modules\node\node.module on line 504.
* warning: implode() [function.implode]: Bad arguments. in C:\webroot\update\cms\modules\node\node.module on line 508.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM drup_node n INNER JOIN drup_users u ON u.uid = n.uid INNER JOIN drup_node_revisions r ON r.vid = n.vid WHERE in C:\webroot\update\cms\includes\database.mysql.inc on line 172.
These warnings dont's appear if the og_galleries module is disabled.
As requested - here is an export of the galleries view:
$view = new stdClass();
$view->name = 'og_galleries';
$view->description = 'OG Galleries view. Edit the content type filter to limit it to types that can be placed in galleries.';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'Galleries';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = 'No items found for this gallery.';
$view->page_empty_format = '1';
$view->page_type = 'og_galleries';
$view->url = 'galleries';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->block = TRUE;
$view->block_title = 'Galleries';
$view->block_header = '';
$view->block_header_format = '1';
$view->block_footer = '';
$view->block_footer_format = '1';
$view->block_empty = '';
$view->block_empty_format = '1';
$view->block_type = 'og_galleries';
$view->nodes_per_block = '5';
$view->block_more = TRUE;
$view->block_use_page_header = FALSE;
$view->block_use_page_footer = FALSE;
$view->block_use_page_empty = TRUE;
$view->sort = array (
array (
'tablename' => 'node',
'field' => 'sticky',
'sortorder' => 'DESC',
'options' => '',
),
array (
'tablename' => 'node',
'field' => 'created',
'sortorder' => 'DESC',
'options' => 'normal',
),
);
$view->argument = array (
array (
'type' => 'galleries_gid',
'argdefault' => '6',
'title' => '%1',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
array (
'type' => 'taxid',
'argdefault' => '6',
'title' => '%2',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
array (
'type' => 'taxid',
'argdefault' => '6',
'title' => '%3',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array (
array (
'tablename' => 'node',
'field' => 'title',
'label' => '',
'handler' => 'views_handler_field_nodelink',
'options' => 'link',
),
array (
'tablename' => 'image',
'field' => 'nid',
'label' => '',
'handler' => 'image_views_handler_image_img',
'options' => 'thumbnail',
),
array (
'tablename' => 'node',
'field' => 'changed',
'label' => '',
'handler' => 'views_handler_field_date_small',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'image',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node, image);
$views[$view->name] = $view;
Comment #3
karens commentedA couple questions and things to try:
1) Do you have the image module enabled? This view won't work unless it is.
2) If so, do you have any images created and placed in galleries that the view should be able to find?
3) Do you have the galleries block enabled? If so, see if disabling the block makes the messages go away.
4) After disabling any galleries blocks, what happens if you change edit your galleries view and change only the page type from 'OG Galleries' to table or list? Does the view work right then?
Comment #4
johns20 commentedBingo! Disabling the og_galleries block stopped the waning messages appearing :-)
I'd been able to add image to group galleries anyway - the warning messages didn't stop anything happening they were just filling up the log.
The on ly thing I changed in the og_galleries view was to set the filter to image nodes only - the page and block settings are still the defaults.
Now I have to try and figure out how to transfer images previously allocated to 'image galleries' into the relevant og_galleries. Any pointers would be welcome.
Thanks a lot for the prompt support :-)
Comment #5
karens commentedI'll have to look into the galleries block code and see what the problem is.
As for transferring data, if you're comfortable working directly in the database it could be pretty easy if all your galleries are for the same group or all are public. OG Galleries uses the same method of handling galleries that Image Galleries uses -- each gallery is a taxonomy term under a 'Gallery' vocabulary. If you look at the vocabulary table in the database, you can see that it shows what module owns the vocabulary. Changing 'image_gallery' to 'og_galleries' in that table will make OG Galleries the owner of the vocabulary. Then you need to look in the og_galleries table for the group that the vocabulary should be attached to (use 0 for public) and change the vid to the vocabulary id that used to be your image gallery, and that will link that vocabulary to that group. The taxonomy terms stay attached to the vocabulary, so changing the vocabulary info will take care of all the terms associated with it without doing anything else.
Comment #6
karens commentedI found and fixed the galleries block problem in the latest commit (all branches).
Comment #7
(not verified) commented