This Bug has been isolated down to the Text Selection Option e.g Plain Text, Filtered Html, Full Html within the Managed Display area of a content type, when I "Add new group" of fields and after creating the Group under the Pay Per View Format and editing parts of the form .... e.g selecting the Text format, selection works OK until the previous page is saved that's when the Error is executed..... I noticed if the form is NOT edited and the Text format selection is not made its O.K ... but you cannot add a description or price without the Text format selection being made as its a MUST select field - option.

Warning: mb_strlen() expects parameter 1 to be string, array given in drupal_strlen() (line 482 of /home/XXX/public_html/XXX/includes/unicode.inc).
Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1571 of /home/XXX/public_html/XXX/includes/bootstrap.inc).

Comments

tontoman created an issue. See original summary.

Farreres’s picture

This must be related with my edition to add text_format for protected messages.

In function function ms_ppv_field_group_format_settings($group) line 2054 of ms_ppv.module the message field is being defined. As it is a text format I had to add value and format fields with the code below:

        '#default_value' => isset($group->format_settings['instance_settings']['message']['value']) ? $group->format_settings['instance_settings']['message']['value'] : $formatter['instance_settings']['message']['value'],
        '#format' => isset($group->format_settings['instance_settings']['message']['format']) ? $group->format_settings['instance_settings']['message']['format'] : $formatter['instance_settings']['message']['format'],

Now I see in all the other cases I have removed the value and format in the else case, so now I am moving this into

        '#default_value' => isset($group->format_settings['instance_settings']['message']['value']) ? $group->format_settings['instance_settings']['message']['value'] : '',
        '#format' => isset($group->format_settings['instance_settings']['message']['format']) ? $group->format_settings['instance_settings']['message']['format'] : '',

Let's hope this corrects the problem.

Farreres’s picture

Status: Active » Needs review

Change committed, please, check.

tontoman’s picture

That seems to have done the Trick .... thanks

Farreres’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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