• Resolved MK Chan

    (@mk-chan)


    Hi Team,

    Please be inform that after install and activated the plugin showing this error:

    head)) { foreach ($data->head as $elem) { if (property_exists($elem, ‘attributes’)) { $attrs = get_object_vars($elem->attributes); } else { $attrs = []; } echo “<{$elem->tagName} ” . attributes_to_string($attrs) . “>”; if (property_exists($elem, ‘innerHTML’)) echo $elem->innerHTML; else if (property_exists($elem, ‘innerText’)) echo $elem->innerText; echo “tagName}>”; } } if (property_exists($data, ‘meta’) && !empty($data->meta)) { foreach ($data->meta as $elem) { $attrs = get_object_vars($elem->attributes); echo “<{$elem->tagName} ” . attributes_to_string($attrs) . “>tagName}>”; } } echo ”; echo ”; } catch (Exception $e) { return; } } function extract_blocks(array $elements, array $blocks = []) { foreach ($elements as $element) { if (array_key_exists(‘widgetType’, $element) && $element[‘widgetType’] === ‘noticefaq’) { $blocks[] = $element; } if (array_key_exists(‘elements’, $element) && !empty($element[‘elements’])) { $blocks = extract_blocks($element[‘elements’], $blocks); } } return $blocks; } function notice_head() { try { $post = get_post(); $is_elementor = (bool)get_post_meta($post->ID, ‘_elementor_edit_mode’, true); if ($is_elementor) { $document = Elementor\Plugin::$instance->documents->get($post->ID); $elements = $document->get_elements_raw_data(); if (empty($elements)) return; $blocks = extract_blocks($elements); foreach ($blocks as $block) { if (!array_key_exists(‘project_id’, $block[‘settings’])) continue; $projectId = $block[‘settings’][‘project_id’]; if (empty($projectId)) continue; add_block_head($projectId); } } else { $blocks = parse_blocks($post->post_content); foreach ($blocks as $block) { if ($block[‘blockName’] === ‘noticefaq/block’) { if (!array_key_exists(‘projectId’, $block[‘attrs’])) continue; $projectId = $block[‘attrs’][‘projectId’]; if (empty($projectId)) continue; add_block_head($projectId); } } } } catch (Exception $e) { return; } }

    Please check.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Quentin Chantel

    (@qchantelnotice)

    Hello MK Chan,

    Thanks for the report, it’s a huge problem from the new 2.0 version that some users faces. We are trying to fix it and releasing a patch as soon as possible, just can you tell me the version of WordPress & PHP that you are using, that can help us to reproduice the bug.

    Plugin Author Quentin Chantel

    (@qchantelnotice)

    Version 2.1.0 has just been released and should solve your problem.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin causing error’ is closed to new replies.