Word Limit Plus
Posted: 11 May 2007 04:44 PM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  32
Joined  03-25-2007

Can anyone tell me why I am getting this error at the top of any page that I use the word_limit_plus plugin.

Notice: Undefined offset: 22 in plugins/pi.word_limit_plus.php on line 70

It actually seems as though it is doing what I want it to do, with the exception of this random error. From my untrained eyes it looks like it is pointing out an error in the actual php plugin. That wouldn’t be my error would it.

Here is the code that I am using as of now.

{exp:word_limit_plus if_exceeds="25" stop_after="22" 
         {summary}
  {
/exp:word_limit_plus} 

Thanks for the help.
And yes I am new to this.

Derik

Mod Edit:This is a plugin, not an extension.  Added code tags

 Signature 

Derik Lolli
www.shift-design.com

Profile
 
 
Posted: 11 May 2007 09:39 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  26092
Joined  05-14-2004

Hey dookie, I deleted your second post, no need to cross-post, you can just bump.

That said if you are having problems and no response here, I’d suggest contacting the plugin’s author directly. =)

 Signature 
Profile
MSG
 
 
Posted: 16 November 2007 08:00 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  188
Joined  11-05-2007

For what it’s worth, I’m having the same problem. Funny thing is, the error only appears in IE (not Firefox).

Anyone find an answer?

Profile
 
 
Posted: 19 November 2007 01:31 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  188
Joined  11-05-2007

I was able to get rid of the warning message by changing from this:

{exp:word_limit_plus if_exceeds="20" stop_after="19" ... 

to this:

{exp:word_limit_plus if_exceeds="20" stop_after="18" ... 
Profile
 
 
Posted: 25 August 2008 10:41 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  132
Joined  01-14-2008

It’s happening to me, too. It seems to be triggered by text being a certain length - perhaps between the two values. It also may be triggered by the presence of HTML tags…?

Profile
 
 
Posted: 25 April 2009 07:59 PM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  510
Joined  03-21-2006

I realise I’m posting to a long-dead thread here, but I think this may be down to a bug in the word_limit_plus plugin.

A (admittedly rather quick) look at the code makes me think that this (around line 70):

for ($i 0$i $stop_after 1$i++) 
{
  $str 
.= $word[$i]." ";

Should be changed to this:

for ($i 0$i $stop_after$i++) 
{
  $str 
.= $word[$i]." ";

It solved the problem for me, certainly.

Cheers,
Stephen

 Signature 

Stephen Lewis |  EE Addons  |  Twitter  |  Custom EE Addon Development

Profile
 
 
Posted: 27 April 2009 09:39 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
RankRank
Total Posts:  132
Joined  01-14-2008

That fixed the issue for me, too - apparently without any disadvantages. Thanks!

As an aside, notice that the “error” is actually a Notice, not an Error or even a Warning - i.e. not a critical issue. It seems to only be displayed to logged-in super-admins, too.

Profile
 
 
Posted: 27 April 2009 09:41 AM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  510
Joined  03-21-2006

As an aside, notice that the “error” is actually a Notice, not an Error or even a Warning - i.e. not a critical issue. It seems to only be displayed to logged-in super-admins, too.

You’re right of course. Still annoyed the hell out of me though wink

Stephen

 Signature 

Stephen Lewis |  EE Addons  |  Twitter  |  Custom EE Addon Development

Profile