No comments for the gallerix nodes

pierrot@drupalfr.org - March 6, 2008 - 14:00
Project:Gallerix
Version:6.x-1.4
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

I've just changed gallererix version on my site to 5.x-1.2
There is no possibility anymore to create content to gallerix nodes, and add comments to gallerix nodes created with the former version create php error.
Thanks for your help

#1

silviogutierrez - March 7, 2008 - 03:47

You may not comment on albums since the pictures are the content, not the album.

However, if you want per picture commenting, take a look at the Gallerix Widget Engine.

Hope that helps,

Silvio

#2

pierrot@drupalfr.org - March 7, 2008 - 14:11

Hi Silvio,

First, thanks for your Gallerix Module, is perfect for uploading pictures into a Drupal Site.

I'm not sure to understand your response. Is it a bug in my site (for exemple the comment module that is doing wrong his job) or this feature is not present anymore into the Gallerix module ?
Because a per album comment is just perfect for what I need.

Thanks for your response

Pierre

#3

silviogutierrez - March 7, 2008 - 15:56

Pierre,

This isn't a bug in your site, I turned off commenting to avoid strange behavior. This is because comments in Drupal use anchor tags (#) to mark their location, and Gallerix uses anchor tags to remember what picture is being viewed.

If you want to try commenting (at your own risk), try commenting the following code on line 898:

<?php
 
//Regular comments need to be disabled in albums.
 
if ($node->type == 'album') {
    unset(
$links['comment_add']);
    unset(
$links['comment_forbidden']);
  }
?>

However, I can't guarantee it'll work.

Silvio

#4

pierrot@drupalfr.org - March 7, 2008 - 17:45

Hi Silvio

I tried what you said, and I have error when I try to put a comment, but the comment is registred well.

    * warning: Invalid argument supplied for foreach() in /home.50/t/r/o/tropspac/www/modules/node/node.module on line 521.
    * warning: implode() [function.implode]: Invalid arguments passed in /home.50/t/r/o/tropspac/www/modules/node/node.module on line 525.
    * 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 node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home.50/t/r/o/tropspac/www/includes/database.mysql.inc on line 172.
    * warning: Invalid argument supplied for foreach() in /home.50/t/r/o/tropspac/www/modules/node/node.module on line 521.
    * warning: implode() [function.implode]: Invalid arguments passed in /home.50/t/r/o/tropspac/www/modules/node/node.module on line 525.
    * 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 node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home.50/t/r/o/tropspac/www/includes/database.mysql.inc on line 172.

It seems to be an error in the node module : the function which populate a node

If you can help

Thanks for your answer

P.S.
The gallerix module doesn't work with the related content module (http://drupal.org/project/relatedcontent) when you attach more than one Gallerix node to another node : the pictures dont load. Do you know this issue? Is it necessary that I post a bug in the tracker?

#5

pasa - April 27, 2008 - 01:23

Pierre ..

Did you leave comments activated and just ignore the logged errors? or did you find a workaround?

#6

pierrot@drupalfr.org - May 21, 2008 - 12:20

Hi,

I still got this problem. I found some kind of workaraund to put drupal's comments to album (not a single picture) but it's not perfect : I still have warning messages.

With the module "related content" (http://drupal.org/project/relatedcontent) I link a blog node with a gallerix node : the gallerix album appears with the blog node. Comments can be put for the node and will appear after the blog node and the gallerix album. BUT, I still got the warning message when the comments are published... The warning message disappear after.

I don't know what is the best solution : enable comments for gallerix albums or use the workaround with relatedcontent...

I don't think the gallerix widget is a good solution for this problem, because it doesn't use the drupal way for comments : cannot do the "latest comments" block for example...

Finally, I think the feature of comments for albums should be enabled in the core module of Gallerix.

Pierrot
(scuse my french :-) )

#7

littledragon - June 7, 2009 - 15:35
Version:5.x-1.2» 6.x-1.4

Otherwise, you can replace the lines by :

  // Regular comments need to be disabled in albums.
  if ($node->type == 'album') {
      unset($links['comment_add']['fragment']);
      unset($links['comment_forbidden']['fragment']);
    //unset($links['comment_add']);
    //unset($links['comment_forbidden']);
  }

No anchor, no problem ;-)

 
 

Drupal is a registered trademark of Dries Buytaert.