Drupal is up and running but how do I ...?

Getting CRAZY errors when submitting comments in forums!

While customizing my forums on my site, I was getting tons of errors, so I followed some of the errors, but when fixing one problem, I would get others... I took out the code I put in my template.php theme file.

Here are the errors:

warning: implode(): Bad arguments. in /modules/node.module on line 363.
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.moderate, 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 /includes/database.mysql.inc on line 120.
warning: implode(): Bad arguments. in /modules/node.module on line 363.
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.moderate, 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 /includes/database.mysql.inc on line 120.

admin pages redirect on submit

I have a site at www.somesite.com and have installed drupal at www2.somesite.com to work on porting content into drupal. the problem is that whenever I submit changes to the site under administer (the www2 site), any of the forms, I end up getting redirected to www.somesite.com. I've checked the form action and all are relative: /q=admin/etc and I can't seem to figure out why this is happening. Is there a place where a base url is listed that I might have goofed when I set up drupal?

Main page breaks php... help!

I'm relativly certain there is some setting in drupal I have missed; however, when I enter php code into a new 'page', the code does not appear on the main page, instead I receive the error:

"Parse error: syntax error, unexpected $end in /usr/share/drupal/includes/common.inc(1858) : eval()'d code on line 37"

I assumed my code was faulty; although it runs perfectly on its own, and when I click on "read more" the php program runs properly... (weird eh?)

I have set the trimmed post limit to unlimited, and that solved nothing. Any assistance would be much appreciated, also the apache logs contain no useful information regarding this error...

An example of my code follows: (edited a bit, but only to remove server info, view full version to see more, the gaps between php contain valid html)


//setup the database connection.

$dbhost = '*my server*';
$dbuser = '*my user*';
$dbpass = '*my passwd*';
$dbname = '*my database*';

//acctually connect

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die
                        ('Error: Cannot connect to mobioCorp Database');
mysql_select_db($dbname);


Database connection test in drupal:


<?php

$SQL = 'SELECT * FROM `Landing_Page_Tracking`';
$result = mysql_db_query($dbname,"$SQL",$conn);
if (!$result) {echo("ERROR: " . mysql_error() . "\n$SQL\n"); }

Easiest way to add fields on contact

I would like to hear others opinion on the easiest way to add phone, fax, and city fields to the contact form. I found this http://drupal.org/node/83497 through the search and not much else.
Is there anything else out there before I start building my own?
Thanks

Only one teaser on the front page, please

This seems like it should be so simple, but I can't find the answer. I have my site set up the way I want it, except for one thing. I want the front page to display only one teaser, while on all the other (taxonomy, etc.) listing pages I want 5 or 10 teasers listed at a time. I know I can use the front_page module to make the front page different from other pages, but if I understand correctly, that would require knowing what PHP Drupal uses to create the node listing and other content on the front page, and I'm not coder enough to have figured that out yet.

Site-wide contact form with i18n

Well, everything works fine with i18n except site wide contact form. I wrote a paragraph to the information part of the site-wide contact form and added 3 categories. Well, all the text fields are translated except the paragraph I wrote. I checked the module. It uses t() for the fields but I think it uses for default values.

Any idea how to get it work? Or any module or way to use it. This can be a bug report for the Contact module but instead I need suggestions. Probably I'll also write this as a bug as well.

Thanks.

Pages

Subscribe with RSS Subscribe to RSS - Post installation