Page 1 of 1

Bug/Mispelling/Corruption in script.js.php

Posted: Mon 12. Apr 2004, 00:14
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

Posted: Mon 12. Apr 2004, 00:51
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);

Posted: Mon 12. Apr 2004, 11:59
by Oliver Georgi
Changed too.

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

Oliver

Hi Oliver

Posted: Mon 12. Apr 2004, 13:30
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

Posted: Mon 12. Apr 2004, 16:56
by Oliver Georgi
I have ment the thing Dexxus has posted.

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

Regards
Oliver

Posted: Mon 12. Apr 2004, 17:12
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

Thanks Oliver

Posted: Tue 13. Apr 2004, 13:56
by jsw_nz
Really looking forward to that Oliver!

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

PHPWCMS!

~yes~

Posted: Tue 13. Apr 2004, 20:07
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.

Posted: Tue 13. Apr 2004, 23:26
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