spaw editor - problem

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
Locked
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

spaw editor - problem

Post by DeXXus »

spaw editor has code from "lang_data.inc.php" in summary: block (above spaw toolbar)
-and- in image library dialog window:

Image
jscholtysik

Post by jscholtysik »

Hi Dexxus,


did you already made an entry in the SourceForge Bugtracker at

http://sourceforge.net/tracker/?group_i ... tid=607698

??

If not, please do so.


Thanks.


Joachim
Quizmaster
Posts: 35
Joined: Fri 27. May 2005, 11:45

Post by Quizmaster »

I have the same problem. I'm now putting everything back to an earlier version. :?
Ben
Posts: 558
Joined: Wed 14. Jan 2004, 08:05
Location: Atlanta
Contact:

Post by Ben »

I'm getting the same errors as DeXXus in a recent install of 1.2.8-20069095 + patch G. I highly doubt the issue is with SPAW, and most likely deals with how it is included in phpwcms. Anyone have a fix or any ideas about this?
Quizmaster
Posts: 35
Joined: Fri 27. May 2005, 11:45

Post by Quizmaster »

@ DeXXus and Ben,

Like I previously posted I have same error. I did solve it for myself. Please take a look at include/inc_lib/wysiwyg.editor.inc.php at line 57. Here the SPAW editor is loaded. When I looked at the files on my server, de SPAW editor wasn't loaded at all. I think my problem has to be found in copying the files to the server. The code should be:

Code: Select all

//load spaw editor
	case 3:
	case 4:
	case 5:
			include_once(PHPWCMS_ROOT."/include/inc_ext/spaw/spaw_control.class.php") ;

			$sw = new SPAW_Wysiwyg( $wysiwyg_editor['field'], 
									$wysiwyg_editor['value'], 
									$wysiwyg_editor['lang'],
									$wysiwyg_spaw_template,
									'default', 
									$wysiwyg_editor['width'],
									$wysiwyg_editor['height']
								   );
			$sw->show();
			break;
The faulty code was:

Code: Select all

//load spaw editor
	case 3:
	case 4:
	case 5:
		
			break;

I downloaded the latest files and uploaded the new wysiwyg.editor.inc.php.

Problem fixed. Please let me know if this fixes your problems. :wink:
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

@Quizmaster & Ben

Sorry I forgot to make it back to this thread. :roll:

The solution was to change the "-" (dashes <--typo) to "_" (underscores):
IN "20060904_phpwcms_1.2.8_patchE.zip" (and/or) "20060905_phpwcms_1.2.8.zip" :

Code: Select all

	//load spaw editor
	case 3:
	case 4:
	case 5:
			// first do a check if translation for given language exists
			$spaw_language_check 		= strtolower(str_replace('-', '', $phpwcms['charset']));
			$wysiwyg_editor['lang']		= strtolower($wysiwyg_editor['lang']);
			
			$spaw_language_folder	= $wysiwyg_editor['lang'].'-'.$spaw_language_check;
			$spaw_language_file		= $wysiwyg_editor['lang'].'-'.$spaw_language_check.'_lang_data.inc.php';
SHOULD BE:

Code: Select all

	//load spaw editor
	case 3:
	case 4:
	case 5:
			// first do a check if translation for given language exists
			$spaw_language_check 		= strtolower(str_replace('_', '', $phpwcms['charset']));
			$wysiwyg_editor['lang']		= strtolower($wysiwyg_editor['lang']);
			
			$spaw_language_folder	= $wysiwyg_editor['lang'].'_'.$spaw_language_check;
			$spaw_language_file		= $wysiwyg_editor['lang'].'_'.$spaw_language_check.'_lang_data.inc.php';
Last edited by DeXXus on Wed 20. Sep 2006, 22:18, edited 1 time in total.
Ben
Posts: 558
Joined: Wed 14. Jan 2004, 08:05
Location: Atlanta
Contact:

Post by Ben »

Yup, that did it! ( changing the '-' for '_' )
Good eye and thanks for posting this fix.
Quizmaster
Posts: 35
Joined: Fri 27. May 2005, 11:45

Post by Quizmaster »

Thanks DeXXus ! 8)
Locked