This forum is for questions about upgrading an existing Drupal site. Don't forget to read the UPGRADE.txt file that comes with every Drupal download.

Forms API and Element array syntax

I've been upgrading a module and as the documentation says might happen, forms is becoming my biggest step.

I have one question so far. One of my conversions when using the forms updater might typically look like this:

$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#default_value' => $edit['name'],
'#size' => 30,
'#maxlength' => 255,
);

When looking through the Drupal modules sometimes I'll see a similar structure without the blank field on the end so it will look something like this instead:

$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#default_value' => $edit['name'],
'#size' => 30,
'#maxlength' => 255); Note there is no comma after the 255 on this version.

My question is: when is it okay to leave the comma off the end and why?

I'm asking this in the context of both creating a form and in the context of the following documentation:

"...In some cases, code may be written in such a way that form elements themselves (and not a fully themed form) need to be returned to a calling function. This is the case with many Drupal core hooks. in this case, simply return the constructed $form array, and let the calling code handle the form rendering..."

...as both circumstances are coming up in this upgrade effort. Any insight into this would be most appreciated!

Problems reverting CCK to 4.7.0 release, missing tables: node_type_content, node_field_instance, and node_field

OK,

How I got here was by using the CVS version of CCK. That did not work. I tried to go back, but I kept getting errors (sorry for not being specific). I was attempting to back out the CCK tables from my Drupal database. I now have a non functional version of CCK. What I think I need to be able to do is create the tables that would be created with module.install from CCK.

Here is what I am getting when I try to add a new content type with CCK:

looks like I am missing tables: node_type_content, node_field_instance, and node_field

I was trying to create a new type named 'asdf'. See below. How do I create the missing tables?

* user warning: Table 'pittsfor_MainDrupal.node_type_content' doesn't exist query: INSERT INTO node_type_content (type_name, label, description, help, title_label) VALUES ('content_asdf', 'asdf', 'asdf', 'asff', 'asdf') in /home/pittsfor/public_html/includes/database.mysql.inc on line 120.
* user warning: Table 'node_content_asdf' already exists query: CREATE TABLE node_content_asdf ( vid int unsigned NOT NULL default '0', nid int unsigned NOT NULL default '0', PRIMARY KEY (vid) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */; in /home/pittsfor/public_html/includes/database.mysql.inc on line 120.
* user warning: Table 'pittsfor_MainDrupal.node_field_instance' doesn't exist query: INSERT INTO node_field_instance (field_name, type_name, weight, label, widget_type, widget_settings, description) SELECT field_name, 'content_asdf', weight, label, widget_type, widget_settings, description FROM node_field_instance WHERE type_name = '' in /home/pittsfor/public_html/includes/database.mysql.inc on line 120.

Confirm Drupal Version

How can I confirm what Drupal version I am running? I think my upgrade from 4.7 to 4.7.3 was successful, but can I confirm this?

Thanks,
Mark

Recipe Module shows Podcasts and Blog enteries

I upgraded from the 4.6 world to the latest 4.7 and also upgraded my modules in the process. The recipe module now is showing non-recipe content. You can see the problem here: http://missions.ritchietribe.net/recipe. In truth I only use this lightly, but would like to have it working. Any idea what got misplaced?

Thanks

Moving from Drupal 4.3 to current version 4.7.x

We have an open source nonprofit software site that's currently in Drupal 4.3 - what are the steps and porcesses in getting the site upgraded/updated to the current version of Drupal - 4.7.x. Are there any 'easy' paths? In looking at posts - it almost looks like one needs to update to each version in-between... I was hoping there is an easier path. Any help/suggestions welcomed. Any guestimate as to time required for such an update? Is there anyone willing to assist in these efforts? Thanks very much in advance!

Categories => Taxonomy module?

Hello everybody!
I've made the Drupal Version 4.7.3 upgrade, but I don't found how to add the category blog? Where are this block? How can I add or have a block with the name of each categories?

Thanks in advance

Best Regard

Pages

Subscribe with RSS Subscribe to RSS - Upgrading Drupal