Hi,
I have a handful of modules for a project currently in development, however each time the cache is cleared I can no longer access the content types from these modules. All my form hooks that submit the nodes plus the additional fields in my own tables have stopped loading in and saving content too.
I did read an article about them disapearing with someone using ubercart nd using hook_init() to solve the issue, although I am fairly sure I'm not doing the same as they were changing config_perms.
For the moment its not stopping development as I can disable and re-enable the module to restore it, without loosing data, but it would be preferable to stop this from happening.
any pointers would be helpful.
Paul
Comments
Please elaborate
Can you please elaborate. What do you mean by "I can no longer access the content types" ? Please elaborate and detail what you expect to occur versus what actually occurs? For example, are the custom modules creating database tables? If so, are the tables present or absent? Is the data that is supposed to be stored in the database, present or absent?
---
I have the same in Drupal 7.
My module creates a content type and initially it appears in /node/add. After cache clear it no longer appears in /node/add.
/node/add/mymodule takes me to /node/add, not the mymodule data entry form, as it did before cache clear.
I installed the examples package and node_example within that package and all works as expected through a cache clear. I'm code browsing to try to work out what the difference is between that package and mine.
Cheers,
Cliff
Hi Cliff, I wrote a follow up
Hi Cliff,
I wrote a follow up post to a different thread and got the answer, http://drupal.org/node/982270
That solution was for Drupal 6, in Drupal 7 I've not done the content types the same way. The my module content types are done as entities.
I think as long as your hook_info is in the .module file all should be ok.
Paul
Paul Linney
Owner & Web Developer
----
Thanks, I'll take a look.
Cheers,
Cliff
---
That fixed it. I'd love to know why. There are modules that don't implement hook_node_info that work OK. EG the Devel module.
Cheers,
Cliff
-- solved
I had misconfigured the node type definition, specifically the 'body' item. See the comment in this page from the API documentation:
http://api.drupal.org/api/drupal/modules--node--node.module/function/nod...
What do you mean by "I can no
Prior to clearing the cache I can goto create create content and all my custom module content types are listed.
I expect them to still be available for adding content versus not being available.
Yes they are
Present
Present
Everything else defined within the modules are still available such as block and menus, just the content types disappear.
Here is one of my modules
Paul Linney
Owner & Web Developer