I accidently deleted the content type 'page' (can't remember how...). Any content that used to be the 'page' content type still shows up on the website, but I can't edit it anymore (I am admin with all permissions). The content also still shows up in admin/content/node, but the TYPE field is empty.

Then I tried to add the content type 'page' again, but it doesn't show up in admin/content/types. I checked the database (table node_type) and the newly created content type is there, but it doesn't fix the problem. Hope that is clear.

Any ideas, folks? Help much appreciated.

Comments

vm’s picture

I'd set up a test site which would include the page content type. Inspect the two databases and try and mimic.

A restore is possible if you've a backup of your database from before the deletion.

bwv’s picture

If all else fails you could install CCK and create your own page content type.

uechi’s picture

but is that actually different compared to use the export/import function in the content type menu (admin/content/types) ? e.g. export 'story', then re-import as 'page' and then disable comments settings and uncheck the 'promote on start page'?

bwv’s picture

You do not need to import anything. Just create a new content type and simply call it "page."

uechi’s picture

I tried that and a 'Page' node type will get created in the database but it still doesn't show up in /admin/content/types and the type column for all content that used to be 'Page' is still empty in /admin/content/node.

uechi’s picture

I created a new content type called page as suggested by bwv and then I had to delete the orig_type field (in the node_type table) of another custom content type based on 'page'.

The only problem was that I also had created another content type (called 'results') based on 'page'. This content type still had a "page" in the orig_type field in the node_type table.
After deleting that, it's all good. I can edit my 'page' content again and it also shows up in /admin/content/node again.

Thanks!!

Aurochs’s picture

thanks great
i also was going around this finally you gave me a hint that my original PAGE was not deleted but renamed.
So did like you which allowed me to escape lots of bugs with other modules which were looking for 'page' content type

fotonut’s picture

This seems more than coincidental that most people are losing the "page", and only the "page" content type. I don't know how it got deleted on my system, just that I didn't do it overtly. The last maintenance I did was installed CCK prior to this upgrade when I noticed it.

Regardless I followed the recommendations here, add back a "Page"-"page" content type and it seemed to work to allow editing of previous "Page" entries. Unfortunately I discovered this during the latest upgrade and thus went down a wasteful path of several hours only to discover it was the "Page" content type that had disappeared and not a problem with the upgrade to 6.16.

I can work with this fix, but I have also lost the description text for the "Page" type and perhaps the default settings as well. I am not familiar enough with Drupal content types yet to know. Being a beginner, I am not sure what else I may have lost from the disappearance of "Page" content type. Is there not a better restore procedure with a full "back to defaults" guarantee for this and other native content types? Thank you in advance.

(Perhaps everyone is just saying that content types are arbitrary and it doesn't matter. Still at minimum, I would like to restore the description of what was there with the fresh install as well as any default settings. It is difficult enough of a learning curve without the default values. THANKS!)

bwv’s picture

I am not doubting your account of what you report, but to be honest I have never heard of the page content simply disappearing under any circumstances. If you think it was related to CCK installation, you might want to check the CK issue queue to see if anyone else is experiencing the same problem. If so, there may be a fix posted.

Meantime, I would not do a fresh installation, especially if you have pages you already have created, especially inasmuch as you have managed to restore the page content type.

Meantime, here is the description of the page:

"A page, similar in form to a story, is a simple method for creating and displaying information that rarely changes, such as an "About us" section of a website. By default, a page entry does not allow visitor comments and is not featured on the site's initial home page."

matthewv789’s picture

I exported the "page" definition, and used it as a base for another content type using Content Copy. I didn't notice the "old_type" and "orig_type" being "page", or know what that meant. Regardless, it created the new content type just fine - but removed the "Page" content type in the process.

Now, I have been able to re-create the "page" type (and apparently was able to import its fields back in), but when I try to edit either the content type or its fields, Drupal just sends me back to the "Content Types" screen.

Further, "Page" does not show up as an option under "Create Content".

Drupal 6.20 / CCK 6.x-2.9

matthewv789’s picture

Clearing cache (and/or running update.php) seems to have fixed it.