When entity limit is reached on one content type the node/add page returns 403

Created on 18 April 2023, about 1 year ago
Updated 11 September 2023, 10 months ago

Problem/Motivation

Hi. When there are more than one limits set up eg, 5 articles for role editor and 1 page for role editor. The path node/add is returning 403 when a page has been created and the page limit has been reached even though the articles are still within the limits.

Steps to reproduce

Set up at least 2 limits for 2 different content types for the same role. Create content to reach the limit of one of the content types. Try to access the node/add page using the role in question.

Proposed resolution

The node/add page should work for all other content types the user has access to create and hide or disable the link for the ones they reached the limit.

🐛 Bug report
Status

Active

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mellowtothemax
  • 🇮🇳India Rajan Kumar

    I attach the following patch, it will allow user to open node/add page if any content type will be within the limits.

  • Thank you, this works but it also bypasses normal node permissions, and as such all content types are visible with create privileges now, unless a limit is also added for that content type.

  • 🇮🇳India Rajan Kumar

    Attached another patch.
    it will allow user to open node/add page if any content type will be within the limits.

  • Thank you.

    This works as intended now while you are within the limits, but when the total limit of all content types is now reached, instead of a 403 as it now should the "node/add" page shows the Add content page with the message "You have not created any content types yet. Go to the content type creation page to add a new content type."

    This can be very confusing to the user.

  • great module, thank you.

    +1 for better user experience. The 403 is jarring. Can there be a redirect path and system message that states that the user has reached their node limit?

Production build 0.69.0 2024