Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
24 Jan 2009 at 18:29 UTC
Updated:
18 Jul 2012 at 00:20 UTC
Jump to comment: Most recent file

Comments
Comment #1
webchickComment #2
karschsp commentedassigning to myself.
Comment #3
karschsp commentedRemoved all mentions of min_word_count.
Comment #5
karschsp commentedre-rolled with cvs diff -up.
Comment #6
webchickCool! A couple of things:
1. Your patch from #62926: Increase maximum length of the free-tagging textbox to 255 characters got accidentally mixed up in here.
2. We should also drop the min_word_count column from the node_type table. This will require both a change to node_schema() and an update hook for people who were using this before.
This issue isn't quite dead yet, since there's still going to be an open question about what happens to the data that used to be in that column, but once the proper functions are there we can try and figure out what to do next. :)
Comment #7
webchickK, scratch that last bit. Just remove the column from node_schema(). We can't write an update hook without users losing data, so people using D6 and earlier will just have an extra column in their database.
Comment #8
Chris Johnson commentedUpdate could:
* check if column has all default values.
If Yes, drop column.
If No, copy values to a new table with just the values and the primary key, for some future contrib module to use.
Then drop the column.
Comment #9
karschsp commentedOK, I've removed min_word_count from node_type and removed the stuff leftover from my other patch. I didn't (yet) write an update hook...I can if you want me to.
Comment #11
karschsp commentedre-rolling patch. let me know what you want me to do about the hook_update() issue, whether or not we should take the values from the min_word_count and store them as variables so a contrib module can use them, or if you just want to leave the column in the node_type schema.
thanks!
Comment #13
dave reidEasiest way is to move the column data to variables named
'node_'. $node->type . '_min_word_count'. I'll take up writing the contrib module that should be available for 7.x before D7 is released.Any ideas on name that should be used for the contrib module?
content_validation? (could be used for more general checks as well)
content_min_word_count?
The contrib module can grab these variables and rename them with the module name if needed.
Comment #14
karens commentedBarry Jaspan is writing a patch to make the body into a field using the new Fields in Core, and this would then be a custom validator for that field. There was talk of adding in a way to add plugable validators to fields in core, but that isn't implemented yet.
So if you want to work on the big picture issue ("could be used for more general checks as well"), you could try to figure out how to implement pluggable validators for Fields in Core, with one of them being this one. Otherwise I would just do a really simple module for this specific purpose and no other since it will probably be deprecated by pluggable validators whenever they come into being.
Comment #15
karens commentedOr maybe don't add a module at all but work it into the body-to-fields-in-core patch as an optional setting.
Comment #16
dave reidThat's getting away from the original purpose, which was to remove it, completely from core. :)
There should be nothing wrong with a new contrib module that could have the possibility to 'validate' more than just the minimum word count, but that is the only thing I want to code right now. As people request features, I can add them. Right now I just want to get an opinion on a name. :)
Comment #17
dave reidRe-rolled with an update function that dumps the {node_type}.min_word_count data into variables named node_min_word_count_type. I just made a quick contrib module that is ready to commit that imports the variables correctly and enforces the minimum word count successfully.
When node bodies become fields, I can just change the contrib module. This should make converting node bodies to fields easier as well since this will be ripped out.
Comment #18
webchickHm. I actually like what Karen proposes quite a lot. I wonder if this is won't fix, and dump our energy into making body a true field instead.
Comment #19
dave reidHad a little extra cruft in last patch, sorry.
Comment #20
karens commented@Dave, I wasn't trying to make more work for you, I was responding to your comment about expanding the new contrib module into a solution to fix other validation issues so you didn't waste time going down the wrong path.
Barry's patch is at #372743: Body and teaser as fields. Assuming that is on its way to getting committed we might want to postpone this issue until after that. This fixes a minor nit, that one is the big kahuna (sp?). Then this postponed issue might become a starting point for optional, pluggable, validators for Fields in Core (or we could go back to the simple solution of just removing this value at that point if that's the consensus).
Comment #21
dave reidI'm in complete agreement that fields should be able to have pluggable validators. We should be able to re-use some kind of minimum word count checking against any type of text field.
However, I'm confused if we're not in agreement that the minimum word count checking should be removed from core and put in contrib. I'm volunteering to maintain the contrib module for this, and I just finished writing a basic module to do that.
Comment #22
dave reidPluggable validators should be separate from this issue, because that is just one bigger thing. Let's keep this *just* about removing the minimum word count checking. :)
Comment #23
dave reidHere's the contrib module I made: http://cvs.drupal.org/viewvc.py/drupal/contributions/sandbox/davereid/co...
Comment #25
Bojhan commentedWas just about to suggest the same, till I found this issue. Can you see why it breaks?
Comment #26
ronia commentedWe use "minimun number of words" for blog so that there is
substantial text before a posted item is called "blog"
Its very vital. We also need "max number of words" which
is not in Drupal.
If this is removed, this part will be broken for us from
Drupal six to seven urgrade, if we ever need it.
Comment #27
dries commentedI'd be OK with removing this feature from core, and have it live on as a contributed module.
Comment #29
stborchertIt is gone now: #522184-10: Remove the 'minimum number of words' feature from Drupal.
Comment #30
ugerhard commentedComment #32
Nordtof commentedso guys,
How can I set the minimum word limit for my site's articles?
I need it now.
Comment #33
Nordtof commentedHow can I set minimum word or character limit to articles in D7, now?
I really need that, but there ise no module or hints in Internet at this moment.
Comment #34
stborchert@Nordtof: This feature has been removed from core.
You have to use a custom module for this (e.g. http://drupalcode.org/viewvc/drupal/contributions/sandbox/davereid/conte...).
Comment #35
Nordtof commentedI really want to congratulate you Mr. Developers.
Min Word Limit function was a really important function for that "heavily populated social web sites". Because of that function, admins can control the spammers cant publish stupid contents to the spesific article categories.
I dont want to see "ahahahahahah ahahaha ahahah ahahaha ahahhaha" articles in my hot-argued categories, but only qualified articles.
So, word limit functions was making people think twice, before publishing stupid articles.
Now, thank you, We dont have it in Drupal 7.
Comment #36
Nordtof commentedOk. Lets do it through module.
But I cant install that module.
I'm downloading all the files, creating a ZIP file, uploading it to the site. and the answer of the site is : "there is no .info file in taht zip"
But there is a .info file in that zip.
any suggestions to help me?
Comment #37
Nordtof commentedGreat,
David confimed that this module is useless because of "out of date".
So, anyone experiencing the same problem like me, try somewhere else. Not here.
Any developer to build a new module for "minimum character limit" is welcome.
Comment #38
Nordtof commenteddrupal community waits a solution to this problem.
How could we add "minimum number of char" limit to the articles?
Comment #39
stevep commentedAm I reading this right?
Basically, a bunch of developers decide they're going to remove some functionality that people clearly need.
But these developers do so before any equivalent add-on module is provided????
To those developers who removed this functionality, how about you extend some courtesy to Drupal users who require it, by either putting it back in, or developing a module to address that loss of functionality.
If you don't feel it's your responsibility to develop that module, then leave the minimum character functionality in Drupal.
Comment #40
khanz commentedI am against removing this feature from core. This comes quite handy in sites where content is created by users.
Comment #41
bassem commentedIt is really weird why would you remove this feature, there are a thousand reasons why this feature is needed, if you are using drupal as a platform for news sites, and you are assigning different news templates, minimum and maximum number of characters is central to online publishing, also if you are running a collaborative authoring environment, whether scientific or research driven, documentation etc.. this feature is also central, please try to put this feature back, until a alternative module is provided.
Comment #42
skizzo commentedThe field_validation module can enforce min/max
number of chars/words (among many other things)
Comment #43
ugers commentedthanks skizzo. i was looking for this module. i think that it should have not been removed from core
Comment #44
jaypabs commentedToo bad you removed this features. Now I can't control my members from posting few words.
Comment #45
Nordtof commentedThis was a huge mistake.
We'were using it for stop our members post the "one word or two lenght" spam nodes.