Cool module. The basic functionality with node limits is working great in Drupal 7 version, but not seeing the "error" message: You can't create more content of type !type"

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dougsap’s picture

Hi Markwk,

When the limit is reached for a particular condition, does the user see that content type as available for creation?

I BELIEVE that the error message was made obsolete by
#1286544: Hide node/add links for users who have reached their limit or display a message to users who have reached their limit

Caveats: I have not been following activity on this project for its whole life. I am not a maintainer. Etc... Dougsap

DuaelFr’s picture

Status: Active » Closed (works as designed)

dougsap is absolutely right.
However, you may see this message when trying to access a node/add/X page by direct URL or with an unprotected link.

markwk’s picture

Thanks for the help guys...

The users are indeed blocked from accessing the add/X when they reach the limit on X. I looked at bit at the code some. It seemed like some of those lines about warning messages weren't being triggered. I agree with this approach entirely and avoiding access entirely to the add/X/ path.

It's the feedback after. What about setting up a custom redirect to some other url? The "access denied" seems a bit off in terms of feedback when the reality is "you've reached your limit.

Santhosh Kalla’s picture

It seems a bit off in terms of feedback of the users when they see "access denied" page when they are in active. So can we write our custom error for this ? Can anyone help me with this ?

Santhosh Kalla’s picture

Status: Closed (works as designed) » Active

It seems a bit off in terms of feedback of the users when they see "access denied" page when they are in active. So can we write our custom error for this ? Can anyone help me with this ?

DuaelFr’s picture

I am sorry but I have no time to handle this for the moment.
I you can provide a patch to have a custom error message or a custom redirection, you will be welcome.

Tsubo’s picture

I'm in agreement here. Either a standard message or the ability to redirect to specific URL would seem appropriate. Just getting an access denied doesn't really explain the situation, and nor does removing the create node links.

Either that or rules integration so we have an event we can act on.

kopeboy’s picture

Priority: Normal » Major
Issue summary: View changes

This module looks abandoned. Come on, this is basic and very important functionality for this module!

I don't have the expertise to patch the module, but a simple rule integration event could make this very flexible and easy to use..

kicr’s picture

I second to everyone's sentiments. This is also beyond my expertise. I wish I had the time to level up enough to get the skills to fix this myself but I don't. I hope someone can add rules integration or at least an error page per node limit type.

  • webankit committed 7f70015 on 7.x-1.x
    Issue #1482498 - Add Error on Content Type to indicate Node Limit
    
neerajskydiver’s picture

Version: 7.x-1.0-alpha5 » 7.x-1.x-dev
Assigned: Unassigned » neerajskydiver
Category: Bug report » Feature request
Status: Active » Needs work

I have added an error in 7.x-1.x version. Please check.
Currently there is no option to change the error but you will get a message like
You can't create more content of type Article. Please contact Site Administrator for more information.

Alex Bukach’s picture

The implementation added at #10 displays the message each time the access to the node/add/[type] page is checked, that it at other pages as well (e.g. if there's a menu link to node/add/[type]). The correct approach would be to display message on respective pages only. Here's a patch that does it.

Alex Bukach’s picture

Assigned: neerajskydiver » Unassigned
Status: Needs work » Needs review
JohnnyW’s picture

Alex= brilliant! #12 worked perfectly! THANK YOU!

abarpetia’s picture

Status: Needs review » Reviewed & tested by the community

Perfect! attached patch #13 worked for me.

  • adriancid committed 4f7379d on 7.x-1.x authored by Alex Bukach
    Issue #1482498 by Alex Bukach, markwk, abarpetia, Nonnie, adriancid: No...

adriancid’s picture

Status: Reviewed & tested by the community » Fixed

Thanks to @all, I just edit a little because we have change dome lines in #1364410: Configurable message and redirection page

Status: Fixed » Closed (fixed)

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