I'm using usernode and node profiles on a site I maintain (fantastic modules!) but there's one little user interface thingy that is a bit frustrating, and can be confusing for my users.

On the "Create Content" screen, it has links to create nodes of types that I have set up as user profile nodes - which they can already create and maintain through their account screens (I set the appropriate settings to have them show under their profile).

Those links are there even when there is a max node population set, and the user has already created as many of those nodes as they are allowed. This means that when they click on the link, it takes them to an empty form, and then only after they submit the form do they get an error message telling them they can create no more nodes of that type.

Additionally, I have set up several node profile content types with max populations of 1, and have activated the feature (which I love!) which allows them to have add/edit tabs in their user account settings screen to edit them. When they access the profile editing tabs under their "my account" screen, all is well - if there's no node of that type, one is created for them, and if there is a node of that type, they are taken to the edit screen.

But, in this case, if they click on the link in the "Create Content" screen, it takes them (naturally) to a node/add screen, not to their existing profile node editing screen, and so, to the user, it may look like their profile node is blank... and when they fill everything in, it will give them an error saying they aren't allowed to create more nodes of that type.

That is definitely going to confuse my users, and increase the number of help requests and bug reports to myself and my moderators.
: )

What would be great is if there was a way to disable the link on the "create content" screen altogether for node profiles - either when the max allowance of that type is exceeded, or when the node type is part of the user's profile.

Failing that, if there was a way that the link would lead to the user's edit node screen when it's a node profile with a population of 1, that would at least keep the confusion to a dull roar.

in the usernode module, this is accomplished under usernode_menu. With Node Profile, it seems like there could be logic entered under nodeprofile_menu to at least check and see if the user has already created too many nodes of that type, and say so there, instead of after the user has already submitted the form - also, it could check and see if there's an existing single population instance, and re-route to the edit form for that node, instead of taking them to the node/add screen... unless I'm completely mistaken.

I had a module (ill-fated) for Drupal 4.7 that I did something like that with, so I'm pretty sure it can be done in 5.0, although it's certainly a pain.

CommentFileSizeAuthor
#2 add_content.patch600 bytesblackdog
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago’s picture

Project: Node Profile » Node Family
Version: 5.x-1.1 » 5.x-1.x-dev

I agree, that this could be better. However, it's not possible to remove this links from the node-add screen, as these are automatically created.

However, we could redirect the user to the node edit screen, if the max population is 1. This would do it for nodeprofiles. As the restriction to 1 is handled by nodefamily, I would suggest to also add this code to nodefamily..
I'd be happy, if you could do a patch for it.

blackdog’s picture

Status: Active » Needs review
FileSize
600 bytes

I too found this to be confusing, so I created a patch that checks if max has been created, and sends the user to their already created node instead. Not sure if I've done it right, so please review. Patch made against dev.

fago’s picture

Status: Needs review » Needs work

the patch works only for max population = 1

apaderno’s picture

Status: Needs work » Closed (outdated)

I am closing this issue, as it has been created for a release that is now not supported. The project doesn't have releases compatible with a supported Drupal version.