This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Populating and storing a $node object and having problems storing the associated CCK fields.

I'm building a $node object in my module with some custom values including setting some CCK fields that I've defined for my content type...when I do a node_submit and then a node_save, everything is storing correctly except for the CCK values, they don't seem to be set at all. Is there something else I need to do to make the CCK custom fields store into the appropriate DB table?

Update hook running multiple times.

I created a module for CiviCRM and I have an update hook that inserts records in the CiviCRM database.

After I enable the module. I run the update.php script. When I click update my update hook runs and the tables are populated, however the update hook gets run more than once; 8 times to be specific.

As a result I get an error of the nature 'record already exists'.

Has anyone had an issue where the code in their update hook is getting run many times over again?

Any assistance would be greatly appreciated.

Adding Tabs and Categories

Hello:

I've added some custom fields to the User Registration form and created the same fields for editing in the My Account section for users. This all works great. On the My Account page under the Edit tab there are categories - Account Settings, Google AdSense, etc. Two questions:

1. How do I add a "category" to the edit tab?

2. My custom fields are showing up for the Account Settings category and the Google AdSense category and other categories. How can I restrict my custom fields/edit forms from showing up on all the tabs?

Warnings given while saving a custom $node object

While trying to create a module that will import certain data as a type of node that I created using CCK, I am getting these warnings after the $node object saves. However, form_get_errors() returns nothing. Is this a bug in the core node code?

# warning: Attempt to assign property of non-object in /usr/share/drupal-5.1/modules/node/node.module on line 549.
# warning: Attempt to assign property of non-object in /usr/share/drupal-5.1/modules/node/node.module on line 554.
# warning: Attempt to assign property of non-object in /usr/share/drupal-5.1/modules/node/node.module on line 556.
# warning: Attempt to assign property of non-object in /usr/share/drupal-5.1/modules/node/node.module on line 557.
# warning: Attempt to assign property of non-object in /usr/share/drupal-5.1/modules/node/node.module on line 575.
# warning: Attempt to assign property of non-object in /usr/share/drupal-5.1/modules/node/node.module on line 578.

The following is the function that I wrote to test out saving my new $node object:

<?php
const DEFAULT_NODE_IMPORT_TITLE = "imported by doc_import";
const DEFAULT_NODE_TYPE = "policy";
const DEFAULT_NODE_FORMAT = 3;
// Default to a published status:
const DEFAULT_NODE_STATUS = 1;
// We don't care if it's promoted, so default to no:
const DEFAULT_NODE_PROMOTE = 0;
// Sticky by default

Amazon S3 file manager

Hi all,

I need a file manager module based on Amazon S3, with this features:

- ability to upload file about 100Mb
- ability to manage files (add, delete, move, create folders...)
- ability to link file from a node body or attach it like images (like attach image module)
- ability to restrict access by user role.

Someone has started a project like this?

Thanks and... sorry for my bad english!

Error on CVS Add Contents

I am using TortoiseCVS and following "Quickstart guide for adding to Drupal CVS using a windows client" on http://drupal.org/node/112902 but when I follow step #7 "CVS Add Contents" then the following error msg appear:
---------------------------------------------------------------------------------------
cvs add: `blogger.info' added independently by second party
cvs add: `blogger.module' added independently by second party
cvs add: `CHANGELOG.TXT' added independently by second party

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions