I have tried wysiwyg filter and html purifier as text filters so that I can allow image resizing (style tags), but with both I have encountered errors re. Missing Argument

Warning: Missing argument 5 for _htmlpurifier_process(), called in C:\mowes_portable\www\drupal\sites\all\modules\ckeditor\includes\ckeditor.page.inc on line 241 and defined in _htmlpurifier_process() (line 148 of C:\mowes_portable\www\drupal\sites\all\modules\htmlpurifier\htmlpurifier.module).

and:
Notice: Undefined variable: langcode in _htmlpurifier_process() (line 149 of C:\mowes_portable\www\drupal\sites\all\modules\htmlpurifier\htmlpurifier.module).

Please see issue: http://drupal.org/node/1219348

I've looked into HTMLawed but have seen that someone has the same error for this.
I am going to have to abandon CKEditor unless I can resolve this.
I would be very grateful if you have any suggestions.
Thanks
Gina

Comments

dczepierga’s picture

Title: Missing argument - WYSIWYG Filter, HTML Purifier & HTMLawed » [D7] Missing argument - WYSIWYG Filter, HTML Purifier & HTMLawed
Status: Active » Fixed

I make a little fix for this bug.
I commit it to GIT (diff).

Pls check last DEV version, if it doesn't work pls reopen this issue (change status to needs work).

Greetings

GinaF’s picture

Many thanks for your response.
Unfortunately, I've already abandoned CKEditor and moved to a different editor. I hope this fix will help others though.
Gina

GinaF’s picture

Status: Fixed » Needs work

I tested your 8 May 7.x-1.x-dev release on my development site (7.x-1.9+7-dev).
Unfortunately, there are still errors:

Warning: Missing argument 6 for wysiwyg_filter_filter_wysiwyg_process(), called in C:\mowes_portable\www\drupal\sites\all\modules\ckeditor\includes\ckeditor.page.inc on line 241 and defined in wysiwyg_filter_filter_wysiwyg_process() (line 25 of C:\mowes_portable\www\drupal\sites\all\modules\wysiwyg_filter\wysiwyg_filter.pages.inc).

AND

Notice: Trying to get property of non-object in wysiwyg_filter_filter_wysiwyg_process() (line 36 of C:\mowes_portable\www\drupal\sites\all\modules\wysiwyg_filter\wysiwyg_filter.pages.inc).

There used to be missing argument 4, 5 & 6, so you've fixed something...
Thanks
Gina

dczepierga’s picture

Status: Needs work » Fixed

@GinaF, really thx for report this. I make next fix for it and commit to GIT (diff).

I don't understand why they have param in function which they don't use anywhere and they don't set default value to it... but ok i fix it.

Pls update to last DEV version and check does u have any warnings/notices.

Greetings

GinaF’s picture

Hi
Thanks for your time on this.. Unfortunately there's still one error:

Notice: Trying to get property of non-object in wysiwyg_filter_filter_wysiwyg_process() (line 36 of C:\mowes_portable\www\drupal\sites\all\modules\wysiwyg_filter\wysiwyg_filter.pages.inc).

The missing argument seems to be resolved though.
Gina

dczepierga’s picture

Could u write which text format do u use and which filters u have enabled in this format?

Greetings

GinaF’s picture

Using Filtered HTML.
I have WYSIWYG Filter and also Image Resize Filter enabled.
I have disabled Drupal's "limit allowed HTML tags"

dczepierga’s picture

@GinaF, i've try to reproduce this again and i don't get any errors... Pls try to update to last DEV version of CKEditor module and last version of CKEditor library.
If problem still exists pls create new issue for it - may be someone have this same error and help how to reproduce/fix it.

Greetings

GinaF’s picture

I did as you suggested, but unfortunately still get the error. I'll open a new issue.l
Thanks for trying.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.