Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6795029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:17:37+00:00 2026-05-26T18:17:37+00:00

My custom module creates a node type with a few CCK fields. When the

  • 0

My custom module creates a node type with a few CCK fields.

When the users un-installs, I need the CCK fields to be deleted so the old CCK occurances don’t interfere with the new ones to be created should the module be re-installed.

I am trying the following code:

function mymodule_uninstall(){
   content_field_instance_delete('field_ccktest', 'my-node-type', FALSE);    
}

But the content_field_instance_delete cones back with a function not recognized.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:17:37+00:00Added an answer on May 26, 2026 at 6:17 pm

    CCK’s CRUD functions live in a file that isn’t included by default in the Drupal bootstrap, you just need to include it in your function:

    function mymodule_uninstall(){
      module_load_include('inc', 'content', 'includes/content.crud');
      content_field_instance_delete('field_ccktest', 'my-node-type', FALSE);    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Drupal 7 module that creates a custom node type. It's working,
Does the CCK api allow me to create a node type, from a custom
In a custom module for drupal 4.7 I hacked together a node object and
I have module that implements custom content type via NodeAPI hooks ( hook_insert ,
I'm trying to make a simple custom field field_book_year for the new node type
I need to know the simplest method to pass variable from custom module to
I've created a custom content type: product This product has an image (cck file
I'm trying to create a node form for a custom type. I have organic
I've got some non-node data in a custom module of mine and I would
I have installed a schema for a custom module which creates the table when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.