See the Mailing lists or Drupal Issue queue. There are also various working groups on groups.drupal.org

is _db_rewrite_sql to blame?

Was trying to implement this snippet on a customized homepage for "authenticated users" using the Advanced Frontpage module. But keep getting the same error, both with and without the suggested addition to the sql (in the comments of the snippet).

The sql from the snippet is:

SELECT distinct n.title, n.nid FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid in ($terms) AND n.status=1 ORDER BY n.created DESC

or

SELECT n.title, n.nid FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid in ($terms) AND n.status=1 ORDER BY n.created DESC

Both create the same problem....

The sql sent to the db by Drupal is:

SELECT distinct n.title, DISTINCT(n.nid) FROM tot_node n INNER JOIN tot_term_node tn ON n.nid = tn.nid WHERE tn.tid in (14,15,16,17,18,19,20) AND n.status=1 ORDER BY n.created DESC LIMIT 0, 10

Looks like the core Drupal db function _db_rewrite_sql has automatically determined to insert the DISTINCT() around n.nid, which apparently makes this invalid syntax(?).

The actual error message I get when i try to save the snippet inside my custom homepage is this:

PHP problem in a Page

Hi everybody..Could someone please help me to understand why this code in a page isn't working? It should just show a list of items retrieved from a xml file..


<?php
if (!($fp=@fopen("../galleria/inverno0708/images.xml", "r")))
die ("Couldn't open XML.");
$usercount=0;
$userdata=array();
$state='';
if (!($xml_parser = xml_parser_create()))
die("Couldn't create parser.");

function startElementHandler ($parser,$name,$attrib){
global $usercount;
global $userdata;
global $state;

switch ($name) {
case $name=="ALBUM" : {
$userdata[$usercount]["LGPATH"] = $attrib["LGPATH"];
$userdata[$usercount]["TITLE"] = $attrib["TITLE"];
$userdata[$usercount]["DESCRIPTION"] = $attrib["DESCRIPTION"];
$userdata[$usercount]["TNPATH"] = $attrib["TNPATH"];
break;
}

}
}

function endElementHandler ($parser,$name){
global $usercount;
global $userdata;
global $state;
$state='';
if($name=="ALBUM") {$usercount++;}
}

function characterDataHandler ($parser, $data) {
global $usercount;
global $userdata;
global $state;
global $userfoto;
if (!$state) {return;}
}
xml_set_element_handler($xml_parser,"startElementHandler","endElementHandler");
xml_set_character_data_handler( $xml_parser, "characterDataHandler");

Trying to think Drupal... (not at SQL query level)! Any advice?

Hi, I'm coming from the angle of a developer who's used to coding at the query level So, I'm often still thinking like that and I can't get my head around this particular problem:

Suppose I would normally set up a database table for a number items in the following manner:
ActivityID Name Unit

1 Accommodation Days
2 Driving Kilometers

etc...

Drupal 5.0 menu system conflicts with standard CSS Psuedo-class :active

I'm not a Drupal module developer by all means, though very familiar with CSS.
I was using Primary Links as a CSS styled dynamic-looking menu where the active page
of menu (as defined by CSS 2.1 compliant ":active" psuedo class) was a similar color. (using Zen theme)
Drupal did not allow me to do this as it generates a class ".active" for the <a> tags
for what it determines as the active link, however it does not
add this class to the link you define as "Home" or "first", therefore not allowing
that link to have an ".active" color. Also directly interferes with ":active" psuedo-class (note the semi-colon):
you can't have a:active as the standard CSS syntax for the link if a.active is what Drupal
determines is the CSS property to use for <a> element.

Throws off the whole point of this CSS menu style/method, which is quite standard.
I had to do an elaborate CSS contextual over-ride using "body.front" tag/property Drupal generates.

This may seem finicky, but Drupal should not dictating what CSS classes you can use!!
and the solution for this is infinitely simple, just change the spelling of one word!
(if the class generated said "activelink" and/or "activetab" instead of "active",
it would not longer interfere with behavior of :active class)

Can this be added to Drupal 6, or will it need to be?

Block - PHP Script - Only display for specific author

In this handbook (http://drupal.org/node/134431) it shows how to display blocks only when viewing a blog entry from a specific author. If anyone could help me out, I have a question regarding this code.

I want to display a different block for each author's blog entries. This code seems to work for this reason with one draw back. It seems to place all of the blocks when you view all blog entries (/blog/). So when you click view blogs you see this big long column of blocks.

i18n/localize status on D6

'm currently testing content translation on nodes in Drupal 6. D6 core give some support for this, but is lacking some important feature in target spec for D6 final. Reading what Gabor have written on several issues here at drupal.org where he confirm/stress that a multi language site on D6 cannot live without Localizer/i18n or View.

This lead me to my Q. What is the current status on i18n and/or Localize?

This is what I have found out, testing with the latest dev. snapshot of D6:
- Some parts of i18n made it into the core?, but the dev snapshot of i18n (getting old now, 5 dec 07). is broken.
- The localize main devel is busy rewriting his D5-tree, creating localize 3. D6 version status unknown. No D6 devel snapshot available.
- View 2, currently under heavy dev. and big big warnings that it is not at all usable.

Could anyone shed some light on the issues and more up2date status?

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core