returns this error and quotes are blank

Notice: Undefined index: safe_value in quote_form_alter() (line 115 of /home/ventbbxc/public_html/modules/quote/quote.module).

CommentFileSizeAuthor
#2 quote.module.patch926 byteskhoomy

Comments

khoomy’s picture

Component: Documentation » Code
Priority: Normal » Critical

After investigation i found that , there are two types of Text Processing for body field as Plain Text and Filtered Text. Plain Text enable save_value in node object but Filtered Text does not. And safe_value is being used for quote for nodes.

At line 115 in quote.module replace

$quote = $node->body[$node->language][0]['safe_value'];

with

$quote = $node->body[$node->language][0]['value'];

will resolve your issue.

khoomy’s picture

StatusFileSize
new926 bytes

Patch attached for safe_value issue

Sk1Zy’s picture

Version: 7.x-1.1-alpha1 » 7.x-1.x-dev

Still getting this error after applying both fixes listed here. Tried both alpha and dev releases.

After applying patch i get:

Notice: Undefined index: is in quote_form_alter() (line 114 of /home/grimurd/public_html/sites/all/modules/quote/quote.module).
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in quote_form_alter() (line 114 of /home/grimurd/public_html/sites/all/modules/quote/quote.module).
Notice: Undefined index: is in quote_form_alter() (line 114 of /home/grimurd/public_html/sites/all/modules/quote/quote.module).

Pimz’s picture

At line 115 I replaced
$quote = $node->body[$node->language][0]['safe_value'];
with
$quote = $node->body[LANGUAGE_NONE][0]['value'];

This worked for me.

Zen’s picture

Status: Active » Fixed

Thanks for the report. I've committed a fix. Please test with the -dev branch and reopen with details on the text format that you are using for the body field if this still persists.

-K

Status: Fixed » Closed (fixed)

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