Hi can anyone help?

I can't add nodes / any content type. I actually see some content types but not the defaults. Please assist!

Here's dump of node type if that helps:
--
-- Dumping data for table `node_type`
--

INSERT INTO `node_type` (`type`, `name`, `module`, `description`, `help`, `has_title`, `title_label`, `has_body`, `body_label`, `min_word_count`, `custom`, `modified`, `locked`, `orig_type`) VALUES
('features_test', 'Testing: Features', 'features', 'Content type provided for Features tests.', '', 1, 'Title', 1, 'Body', 0, 0, 0, 1, 'features_test'),
('audiox', 'audiox', 'node', '', '', 1, 'Title', 1, 'Body', 0, 1, 1, 1, ''),
('image', 'Image', 'image', 'An image (with thumbnail). This is ideal for publishing photographs or screenshots.', '', 1, 'Title', 1, 'Body', 0, 0, 0, 1, 'image'),
('audio', 'Audio', 'audio', 'An audio file. The audio file could be used for adding music, podcasts, or audio clips to your site.', '', 1, 'Title', 1, 'Body', 0, 0, 0, 1, 'audio'),
('blog', 'Blog entry', 'blog', 'A blog entry is a single post to an online journal, or blog.', '', 1, 'Title', 1, 'Body', 0, 0, 0, 0, 'blog'),
('poll', 'Poll', 'poll', 'A poll is a question with a set of possible responses. A poll, once created, automatically provides a simple running count of the number of votes received for each response.', '', 1, 'Question', 0, '', 0, 0, 0, 1, 'poll'),
('forum', 'Forum topic', 'forum', 'A forum topic is the initial post to a new discussion thread within a forum.', '', 1, 'Subject', 1, 'Body', 0, 0, 0, 1, 'forum'),
('restricted', 'restricted', 'node', 'content restricted to authorized users', '', 1, 'Title', 1, 'Body', 0, 1, 1, 0, ''),
('story', 'Story', 'node', 'Stories are articles in their simplest form: they have a title, a teaser and a body, but can be extended by other modules. The teaser is part of the body too. Stories may be used as a personal blog or for news articles.', '', 1, 'Title', 1, 'Body', 0, 1, 1, 0, 'story'),
('book', 'Book page', 'node', 'A book page is a page of content, organized into a collection of related entries collectively known as a book. A book page automatically displays links to adjacent pages, providing a simple navigation system for organizing and reviewing structured content.', '', 1, 'Title', 1, 'Body', 0, 1, 1, 0, 'book');

CommentFileSizeAuthor
#4 query.txt6.65 KBcaptaingeek

Comments

lyricnz’s picture

Status: Active » Postponed (maintainer needs more info)

You need to describe more about your problem. What are you trying to do, and what happens?

captaingeek’s picture

sure - im going to

http://example.com/?q=node/add

and

"You have not created any content types yet. Go to the content type
creation page to add a new content type."

This is an existing site with many nodes already in existance and working.

Drupal Permissions have been checked.

Can create comments.

This is a local server I can do anything on the server. Its running IIS7, Mysql n PHP5.

lyricnz’s picture

Install devel module, then go to /devel/php and execute the following code (without the open-php and close-php tags)

$item = menu_get_item('node/add');
print_r($item);
$content = system_admin_menu_block($item);
print_r($content);

Save that output as a txt file, then attach to this issue please.

captaingeek’s picture

StatusFileSize
new6.65 KB

thanks for your help! Please see attached, I think this is what you wanted.

captaingeek’s picture

Status: Postponed (maintainer needs more info) » Active
lyricnz’s picture

Which user id are you? It looks like there are some content types that are available to be created, if you have access: audiox, degimedia, degimedia-other. If in doubt, use the super-admin (uid 1).

dddave’s picture

catch’s picture

captaingeek’s picture

@#6 I'm uid 1

I found that I can goto /?q=node/add/blog and add that content type, however all the wrong content types show up here at

/?q=node/add

yet none of the defaults do despite the correct permissions being set.

tech108’s picture

Did you disable all modules and then re-enable them again?

That fixed my issue.

catch’s picture

I failed to mark this duplicate of the other issue but last couple of posts suggest it isn't.

When you say 'none of the defaults do' what do you mean by that? Content types provided by core or contrib modules? From the features module? Please list all modules you have installed on the site.

catch’s picture

@captaingeek. The node type table you dumped in the first post here is for Drupal 6, not Drupal 7. Please confirm which Drupal version you're using and whether you upgraded from D6.

captaingeek’s picture

yes I upgrade from d6. This site has been in existance since around drupal 4 or 5. During the upgrade there was no errors.

lyricnz’s picture

To expand on #12, the SQL you included at the top of this issue included:

INSERT INTO `node_type` (`type`, `name`, `module`, `description`, `help`, `has_title`, `title_label`, `has_body`, `body_label`, `min_word_count`, `custom`, `modified`, `locked`, `orig_type`) VALUES

but the correct structure for node_type in D7 is:

mysql> describe node_type;
+-------------+---------------------+------+-----+---------+-------+
| Field       | Type                | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------+-------+
| type        | varchar(32)         | NO   | PRI | NULL    |       |
| name        | varchar(255)        | NO   |     |         |       |
| base        | varchar(255)        | NO   |     | NULL    |       |
| module      | varchar(255)        | NO   |     | NULL    |       |
| description | mediumtext          | NO   |     | NULL    |       |
| help        | mediumtext          | NO   |     | NULL    |       |
| has_title   | tinyint(3) unsigned | NO   |     | NULL    |       |
| title_label | varchar(255)        | NO   |     |         |       |
| custom      | tinyint(4)          | NO   |     | 0       |       |
| modified    | tinyint(4)          | NO   |     | 0       |       |
| locked      | tinyint(4)          | NO   |     | 0       |       |
| disabled    | tinyint(4)          | NO   |     | 0       |       |
| orig_type   | varchar(255)        | NO   |     |         |       |
+-------------+---------------------+------+-----+---------+-------+
13 rows in set (0.02 sec)

Which has several differences.

Did you run update.php on the new Drupal 7 install? Node module should have upgraded all of these tables during the upgrade.

captaingeek’s picture

Yes I did. I can try to run through the process again and see if I can get some more details.

asauterChicago’s picture

I am also experience the same issue after upgrading, only this time in Drupal 7. I've tried everything including the above "enable add content then renable add content in the administration menu" thing. Dumped the cache, ran update.php several times nothing works. I can however create new content types and it will see it, but it can never create existing content types. I could create new content types for everything then copy and paste everything into those new content types, but at that point I might as well recreate the site. After several hours on this I'm half tempted to just recreate the site unless someone has a suggestion... because I'm thinking after pulling my hair out on this for a couple of days, it may be easier/faster just to copy paste and reconfigure everything (and just never update the site *ever* again after this :-/).

captaingeek’s picture

are you able to access them in 6.x?

also which modules are you using?

catch’s picture

Status: Active » Postponed (maintainer needs more info)

I think this is likely a duplicate of #1181030: Node types disabled by _node_types_build() when using node_type_save() with base != 'node_content'. Either way we definitely need more information to be able to debug this, so marking as such.

captaingeek’s picture

turns out that this was a problem in 6.x. I'm upgrading a site from 5.x to 6.x to 7.x but didn't check in 6.x and found that the problem is occurring there. Not sure where to go from here... whether to keep working in this thread or create a new issue.

captaingeek’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

fixed by http://drupal.org/node/613292 not sure of cause.

skere’s picture

For what it's worth, I'm experiencing the same problem and found a workaround.

I'm using Drupal 7 (7.23). If I log in as an Administrator and click "content" and then "add content", I get the message "You have not created any content types yet", which is not the case. Also, if I try going directly to this URL:

http://example.com/?q=node/add

I get the same erroneous message "You have not created any content types yet", and again, this is not the case, I do have content types.

HOWEVER, this works for me:

http://example.com/?q=node/add/blog

So in the meantime, until I identify the root cause of the problem, I'm able to add blog posts successfully with this workaround. I just added a blog post and published it, no problem. Also, to add a basic page, this works for me:

http://example.com/?q=node/add/page

I'm assuming you could just replace "page" with whatever other content type you're trying to add.

For what it's worth.