Closed (duplicate)
Project:
Wysiwyg
Version:
6.x-2.0
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2009 at 12:53 UTC
Updated:
31 Jan 2010 at 12:05 UTC
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!
| Comment | File | Size | Author |
|---|---|---|---|
| Capture.PNG | 23.35 KB | gjoellee |
Comments
Comment #1
twodHave you tried using the standard theme?
Comment #2
gjoellee commentedTried "Garland" and the error still occurs.
Comment #3
twodCould 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.
Comment #4
gjoellee commentedThis 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++;
}
}
Comment #5
twodI 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.Comment #6
gjoellee commentedSorry, 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?
Comment #7
twodOpen 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.Comment #8
gjoellee commentedpasted 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!
Comment #9
twodOk, 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.
Comment #10
gjoellee commentedYes, 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.
Comment #11
twodGood, 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.
Comment #12
sunPlease put the line containing the "print..." into the theme function, as the very first line, and post the output again, please.
Comment #13
twodI 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?
Comment #14
sunMost likely it is.
Comment #15
Cousken commentedThere 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.
Comment #16
twod@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.