I am doing some important changes on my website, but I can't get them done because when I was about to edit the WYSIWYG profile this error appeared:

warning: Parameter 1 to theme_wysiwyg_profile_overview() expected to be a reference, value given in /customers/stupidreality.org/stupidreality.org/httpd.www/includes/theme.inc on line 617.

There is an attached screenshot as well. Help is appreciated!

CommentFileSizeAuthor
Capture.PNG23.35 KBgjoellee

Comments

twod’s picture

Have you tried using the standard theme?

gjoellee’s picture

Tried "Garland" and the error still occurs.

twod’s picture

Could you insert some code to print out the value sent to theme_wysiwyg_profile_overview()? Drupal is supposed to pass the form to be rendered and if it doesn't it would be interesting to know what it passed instead.

gjoellee’s picture

This is line 617: $output = call_user_func_array($info['function'], $args);

and this is a larger section:

if (!empty($info['file'])) {
$include_file = $info['file'];
if (isset($info['path'])) {
$include_file = $info['path'] .'/'. $include_file;
}
include_once($include_file);
}
if (isset($info['function'])) {
// The theme call is a function.
$output = call_user_func_array($info['function'], $args);
}
else {
// The theme call is a template.
$variables = array(
'template_files' => array()
);
if (!empty($info['arguments'])) {
$count = 0;
foreach ($info['arguments'] as $name => $default) {
$variables[$name] = isset($args[$count]) ? $args[$count] : $default;
$count++;
}
}

twod’s picture

I am aware of the code, I need the contents of the $args variable when $info['function'] is 'theme_wysiwyg_profile_overview' to figure out why it's considered a value instead of a reference.

gjoellee’s picture

Sorry, I am not the best at English nor the best programmer, but I will once again try to answer your question by asking you a new question. Where do i find the contents of the $args variable?

twod’s picture

Open wysiwyg.admin.inc and insert print 'DEBUG BEGIN!';print_r($form);print 'DEBUG END'; at the top of theme_wysiwyg_profile_overview(&$form) . Then load the admin/settings/wysiwyg page, view he source and find where the contents were printed out and copy everything between DEBUG BEGIN and DEBUG END.

gjoellee’s picture

pasted the code so it looks like this:

/**
* Return HTML for the Wysiwyg profile overview form.
*/
print 'DEBUG BEGIN!';print_r($form);print 'DEBUG END';
function theme_wysiwyg_profile_overview(&$form) {

if (!isset($form['formats'])) {
return;
}

checked the source and it looks like this:

DEBUG BEGIN!DEBUG END

Nothing!

twod’s picture

Status: Active » Postponed (maintainer needs more info)

Ok, that explains why there's an error. Now to figure out why this happens.
Let's see, you're on Wysiwyg 6.x-2.0 and Drupal 6.15 (judging by the line numbers).
Which PHP version are you using and on which OS?
Have you tried Wysiwyg 6.x-2.x-dev?
Do you use any modules which modify a lot of forms? I want to try ruling out interference between modules.
Are you using the default theme engine?

Btw, I'm off to celebrate Christmas at my patent's place so I might not be online much today, sorry.

gjoellee’s picture

Yes, I am using Wysiwyg 6.x-2.0 on Drupal 6.15. Now I don't run the server myself, but it is running on Debian, and it is either PHP 5.3 or 5.2.10.

I changed to the dev version of Wysiwyg, and the error still appears, but I am able to modify the profile.

twod’s picture

Version: 6.x-2.0 » 6.x-2.x-dev

Good, then we can at least lower the priority of this, if you don't mind. Also bumping the version as the warning still exists in 6.x-2.x-dev.

EDIT: I'm sorry for not seeing the mistake sun mentions below.

sun’s picture

Priority: Critical » Normal

print 'DEBUG BEGIN!';print_r($form);print 'DEBUG END';
function theme_wysiwyg_profile_overview(&$form) {

Please put the line containing the "print..." into the theme function, as the very first line, and post the output again, please.

twod’s picture

Version: 6.x-2.x-dev » 6.x-2.0

I just noticed #613480: PHP 5.3 Support mentions this happens on PHP 5.3, which would explain why I can't reproduce it on 5.2.1.

Are you using 5.3 as well?

sun’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Most likely it is.

Cousken’s picture

There is still no solution to this? What a shame, i have just encoutnered the same problem in php 5.3. I'm not runing the server either so i can't tell you what OS they run this on, but it's One.com that provides the service.

twod’s picture

@Cousken, see comment #13. This issue was marked a duplicate of #613480: PHP 5.3 Support, which in turn was fixed. The patch from there was applied to all branches and should be in the 6.x-2.x-dev snapshot.