Hey, Thank you guys for making this useful module.

Problem/Motivation

But, I just noticed that it broke the API response using (services module) when reaching the limit.
It took a long time when I tried to debug the issue :) at least I wished that it logged an info log message.

1. Install a new Drupal 7 installation.
2. Download and enable (services) module.
3. Create new service enpoint and enable creating nodes using services endpoint /node (create).
4. Enable and configure Node limit interval to limit for 1 minute for example.
5. POST a new request to creae node using the endpoint URL more than one time in the same minute.
The response will not be JSON will be HTML code of the site homepage :(

The conflect because of using drupal_goto() on this function node_limit_node_prepare: https://git.drupalcode.org/project/node_limit/blob/7.x-1.x/node_limit.mo...

The conflict will happen:
- When using services endpoints for creating new nodes.
- Any custom code that implements drupal_form_submit().
- Any Drush commands that will create nodes. e.g. devel drush command to generate bulk nodes.

Proposed resolution

I think if we can accomplish this validation without using drupal_goto it would be better.
Sadly, I can't think of a specific way to do that. But would love to discover the possible ways with you guys.
Maybe we may add a small feature to execlude some URLs.

Thanks!

Comments

samaphp created an issue.

adriancid’s picture

Hi, thanks for reporting and for use the Issue Summary Template, I'm trying to finish now the Node Revision Delete module and putting all my free time on this, but if you submit a patch I can review it without problem.