We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 6341 - Abstract word count limits appear to be incorrect
Abstract word count limits appear to be incorrect
Status: RESOLVED FIXED
Product: OCS
Classification: Unclassified
Component: General
2.3.4
All All
: P3 normal
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-10 11:48 PST by James MacGregor
Modified: 2014-05-23 05:55 PDT (History)
3 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Patch against OCS pre-2.3.4 (1.12 KB, patch)
2011-01-10 13:04 PST, Alec Smecher
Details | Diff
Patch against OJS 2.4 stable (1.13 KB, patch)
2014-05-23 05:55 PDT, Jason Nugent
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James MacGregor 2011-01-10 11:48:23 PST
Again, courtesy of http://pkp.sfu.ca/support/forum/viewtopic.php?f=3&t=7003&p=27045#p27045. It appears that abstract word counts are not correctly calculated, although while Trudy appears to be seeing a situation where more words than the limit can be added, I'm seeing one where drastically fewer words than the limit can be added (eg. when word limit is set to 200, I can only add 100). I can troubleshoot this further, but it would be nice to know what "counts" as a word.
Comment 1 Alec Smecher 2011-01-10 13:04:27 PST
Created attachment 3411 [details]
Patch against OCS pre-2.3.4

The abstract word count didn't remove HTML tags before counting. The count will always be a little rough, since we're guessing the number of words in HTML content, but it should be closer than you report. Could you try the attached patch and see if it improves the situation?
Comment 2 James MacGregor 2011-08-15 13:20:44 PDT
(In reply to comment #1)
> Created attachment 3411 [details]
> Patch against OCS pre-2.3.4
> 
> The abstract word count didn't remove HTML tags before counting. The count will
> always be a little rough, since we're guessing the number of words in HTML
> content, but it should be closer than you report. Could you try the attached
> patch and see if it improves the situation?

Hi Alec -- that's much closer now, thanks!
Comment 3 Alec Smecher 2011-08-15 13:32:53 PDT
Thanks, James; committed against ocs-stable-2_3 and master.
Comment 4 Alec Smecher 2011-08-15 13:35:01 PDT
Fixed word count
https://github.com/pkp/ocs/commit/13beaa1d86e3a6066a8b656113ed6e465a3e28d0
Comment 5 Michael Felczak 2014-05-23 05:15:10 PDT
This looks like it needs a port to ojs stable.
Comment 6 Jason Nugent 2014-05-23 05:52:03 PDT
Fixed word count
https://github.com/pkp/ojs/commit/06c577191a4ce5b957386a9bd088972acb5676c8
Comment 7 Jason Nugent 2014-05-23 05:52:37 PDT
ported, closing again.  Thanks for noticing, Michael.
Comment 8 Jason Nugent 2014-05-23 05:55:05 PDT
Created attachment 4029 [details]
Patch against OJS 2.4 stable