[dev] Re: [cvs] commit: ansel list.php view.php ansel/templates/list
gallery_headers.inc header.inc ansel/templates/view
subgallery_header.inc
Ben Chavet
ben at chavet.net
Mon Sep 6 08:56:14 PDT 2004
I feel kinda bad that I can't fix this stuff myself, but... more postgres
datatree problems that this patch revealed. Instead of a gallery listing, I
get "An error occurred listing galleries: DB Error: unknown error" and "There
are no photo galleries available."
I traced it to Datatree_sql::countByAttributes() where the SQL statement:
SELECT COUNT(DISTINCT c.datatree_id) FROM horde_datatree c LEFT JOIN
horde_datatree_attributes a1 ON a1.datatree_id = c.datatree_id WHERE
c.group_uid = 'horde.shares.ansel' AND ((a1.attribute_name = 'owner' AND
a1.attribute_value = 'ben') OR (a1.attribute_name = 'perm_users' AND
a1.attribute_key = 'ben' AND CASE WHEN CAST(a1.attribute_value AS VARCHAR) ~
'^-?[0-9]+$' THEN (CAST(a1.attribute_value AS INTEGER) & 2) <> 0 ELSE FALSE
END) OR (a1.attribute_name = 'perm_creator' AND CASE WHEN
CAST(a1.attribute_value AS VARCHAR) ~ '^-?[0-9]+$' THEN
(CAST(a1.attribute_value AS INTEGER) & 2) <> 0 ELSE FALSE END) OR
(a1.attribute_name = 'perm_default' AND CASE WHEN CAST(a1.attribute_value AS
VARCHAR) ~ '^-?[0-9]+$' THEN (CAST(a1.attribute_value AS INTEGER) & 2) <> 0
ELSE FALSE END) OR (a1.attribute_name = 'perm_groups' AND a1.attribute_key IN
(2722, 2720) AND CASE WHEN CAST(a1.attribute_value AS VARCHAR) ~ '^-?[0-9]+$'
THEN (CAST(a1.attribute_value AS INTEGER) & 2) <> 0 ELSE FALSE END)) AND
datatree_parents = '' AND a1.attribute_name = a1.attribute_name ORDER BY
c.datatree_order, c.datatree_name, c.datatree_id
returns:
ERROR: column "c.datatree_order" must appear in the GROUP BY clause or
be used
in an aggregate function
when it is run directly on postgres. For some reason, no errors show
up in the
horde log, but I'm pretty sure this is the troublemaker.
--Ben
Quoting Jan Schneider <jan at horde.org>:
> jan 2004-09-06 08:28:14 PDT
>
> Modified files:
> . list.php view.php
> templates/list gallery_headers.inc header.inc
> templates/view subgallery_header.inc
> Log:
> This are the set of patches that make Ansel use the limit in selecting
> galleries. I also changed the changed the number of galleries phrase to
> "Displaying from %s to %s of %s galleries".
> Submitted by: Duck <duck at obala.net>
>
> Revision Changes Path
> 1.37 +21 -10 ansel/list.php
> 1.13 +0 -10 ansel/templates/list/gallery_headers.inc
> 1.7 +1 -1 ansel/templates/list/header.inc
> 1.6 +1 -1 ansel/templates/view/subgallery_header.inc
> 1.55 +17 -8 ansel/view.php
>
> Chora Links:
> http://cvs.horde.org/diff.php/ansel/list.php?r1=1.36&r2=1.37&ty=u
>
> http://cvs.horde.org/diff.php/ansel/templates/list/gallery_headers.inc?r1=1.12&r2=1.13&ty=u
>
> http://cvs.horde.org/diff.php/ansel/templates/list/header.inc?r1=1.6&r2=1.7&ty=u
>
> http://cvs.horde.org/diff.php/ansel/templates/view/subgallery_header.inc?r1=1.5&r2=1.6&ty=u
> http://cvs.horde.org/diff.php/ansel/view.php?r1=1.54&r2=1.55&ty=u
>
> --
> To unsubscribe, mail: cvs-unsubscribe at lists.horde.org
>
>
More information about the dev
mailing list