I'm afraid that I'm not having much luck with this module. I've created a rule that users should be able to create only one node of type "My Profile". I have given authenticated users the right to create and edit a node of that type.

The admin account can create as many of these node types as he can enter, and authenticated users can't see it to create such a node type.

Am I doing something wrong, or is this a bug?

Comments

ericinwisconsin’s picture

OK, I figured it out by playing with it. This is what I want to use the module for:

Create a node type that every user can have just one of that content type. So let's assume you make a special content type called "About Me", and every user should have only one "About Me" page. So you do this:

1. Create a node type called "About Me".

2. Activate the following modules:

Node Limit
Node Limit Type
Node Limit User of Role

3. Go to admin/structure/node_limit.

4. Add A New Node Limit

5. Name it and set the limit to "1".

6. Check "Content Type" and choose the "About Me" type that you've already created.

7. Check "User of Role" and choose the role (in my case, just "authenticated user".)

8. Click on the "Add Node Limit" button.

I assume that this is how most people will use this module.

It's a very useful module, but documentation is needed.

DuaelFr’s picture

Title: Doesn't Work At All? » Limit 1 node type by user having a role
Category: bug » support
Status: Active » Fixed

You are right, there is a big lack in documentation.
Let's mark this issue as fixed support request and thank you for the small tutorial.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

HansKuiters’s picture

Component: Code » Documentation

Could this be copy/paste in the README.txt file? It took me a while to figure it out before I found this post, but for future user it might help. I think this module works great this way. It suits my needs.

DuaelFr’s picture

A link to this issue has been added in the project main page.

shrop’s picture

I have this method a go because it is exactly what I am looking for and it isn't working. It seems like the Type option is limiting submissions to 1 per content type regardless of the user role setting being there.

Has anyone had this issue?

shrop’s picture

Status: Closed (fixed) » Active

opening

cilefen’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha5

I have this method a go because it is exactly what I am looking for and it isn't working. It seems like the Type option is limiting submissions to 1 per content type regardless of the user role setting being there.

Has anyone had this issue?

Yes, the same.

cilefen’s picture

Sorry! Actually it is working. I was using the wrong submodule. Make sure you use Node Limit User of Role.

scott.browne’s picture

Issue summary: View changes

This is a fantastic module. I needed it for the exact reasons posted.

I didn't expect it to actually hide the add content field as well when the limit was used up. Very impressed :)

CD’s picture

I'm using this module and it does what it says on the tin :)

Just a word for newbies like me:

2. Activate the following modules:

Node Limit
Node Limit Type
Node Limit User of Role

Are all modules in the same zip you get when you download https://www.drupal.org/project/node_limit

It's quite easy to install; I did it!

hockey2112’s picture

I am having trouble getting this to work...

1. I created a node type called "Photo".

2. I activated the following modules:

Node Limit
Node Limit Type
Node Limit User of Role

3. I went to admin/structure/node_limit.

4. I added A New Node Limit

5. I named it and set the limit to "5".

6. I checked "Content Type" and choose the "Photo" type that I've already created.

7. I checked "User of Role" and chose the role (in my case, just "authenticated user".)

8. I clicked on the "Add Node Limit" button.

As of now, authenticated users can add more than 5 nodes... an infinite number of nodes, using /node/add/photo. What would cause this behavior, and how can I troubleshoot it?

hockey2112’s picture

Version: 7.x-1.0-alpha5 » 7.x-1.x-dev
hockey2112’s picture

Well, I downgraded to the 7.x-1.0-alpha5 version, and now it works.