Bug/Mispelling/Corruption in script.js.php

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
Locked
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Bug/Mispelling/Corruption in script.js.php

Post by jsw_nz »

Working with 3_28 version.
DeXXus says the same file exists in 4-04 version.

File Name/Location: .../phpwcms/include/inc_ext/spaw/class/script.js.php
File Creation|Modification Date: Feb 20

There seems to be a mispelling on line 8 of this file:

Code: Select all

for(i=0;i<spaw_editors.lenght;i++)
Upon (1) correcting the spelling (2) correcting the spelling and including the <?php ?> opening/closing tags, the editor hangs.

IE 6 errors relate to 'object expected' (line 5 and 17) when the page loads:

..../phpwcms/phpwcms.phpdo=articles&p=2&s=1&aktion=1&id=35
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

An additional accidental mis-spelling of "length" needs correction in phpWCMS :)
File "/include/inc_lib/general.inc.php" needs the following lines changed at about 455-458:

IS:

Code: Select all

function cut_string($string, $endchar = "…", $lenght = 20, $trim = 1) {
	if($trim) $string = trim($string);
	if(strlen($string) > $lenght) {
		$string = substr($string, 0, $lenght);
SHOULD BE:

Code: Select all

function cut_string($string, $endchar = "…", $length = 20, $trim = 1) {
	if($trim) $string = trim($string);
	if(strlen($string) > $length) {
		$string = substr($string, 0, $length);
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Changed too.

But function mis-spelling did not make problems - just a var name...

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Hi Oliver

Post by jsw_nz »

Hi Oliver,

My respects to you and phpwcms. I come from a design background, and my only real scripting experience is in Flash (New to PHP).

What you mentioned (function mispelling) is news to me.............did not know that. I wanted to ask you however why, when I corrected the spelling as documented the editor would hang, with an error thrown on the page (task bar icon). Cannot understand why one small spelling correction would cause this to happen.

BTW, while I have your attention, I wanted to ask if you have plans to incorporate the feature that spirou had gotten working on an earlier version of yours, namely the radio-button content everywhere function. I can see this as being particularly useful, since content could populate various sections of page templates. Do you have plans to work on implementing it in future releases? I wanted to thank you for you app!really great.

cheers from new zealand,
jsw
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

I have ment the thing Dexxus has posted.

Spirou's idea will be integrated - but a bit different.

Regards
Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
snobba
Posts: 166
Joined: Sat 6. Mar 2004, 12:41
Location: Sweden
Contact:

Post by snobba »

Oh man...We are really looking forward to this new release! Especially this 'content everywhere' (maybe it will be ID-everywhere!?) which I think is so important for a modern and functional site...I also hope that a copy function will be integrated and not only cut as it is now.

We wish and hope for a lot of things but we really can't expect and demand anything. Respect to you Oliver!

Greetings from Martin
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Thanks Oliver

Post by jsw_nz »

Really looking forward to that Oliver!

This would offer true design-driven possibilities......

PHPWCMS!

~yes~
Moozie
Posts: 164
Joined: Sat 8. Nov 2003, 00:21
Location: Netherlands

Post by Moozie »

When you do the change as desribed above...:

Code: Select all

for(i=0;i<spaw_editors.length;i++)
...then you get problems with the spaw editor. When you want to edit an article content, type "WYSIWYG with image", the he shows you an empty edit form. So he does not fill the formfield with the required input from the database.

If you change it back to to the original value (so with the type error in the word "lenght"...:

Code: Select all

for(i=0;i<spaw_editors.lenght;i++)
...it works fine again.

Can anybody confirm that he has the same experience with this? Please post here.
User avatar
Oliver Georgi
Site Admin
Posts: 9906
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Just for you information regarding the "buggy" code in script.js.php of the SPAW wysiwyg editor.

This is the answer of the SPAW developer:
Yes that was a bug but accidentally it saved from executing the code that
doesn't work So will have to investigate the issue and fix it or remove
that code completely.
Regards
Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Locked