Title: Plugin causing error
Last modified: December 13, 2023

---

# Plugin causing error

 *  Resolved [MK Chan](https://wordpress.org/support/users/mk-chan/)
 * (@mk-chan)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/plugin-causing-error-8/)
 * 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](https://wordpress.org/support/users/qchantelnotice/)
 * (@qchantelnotice)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/plugin-causing-error-8/#post-17274119)
 * 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](https://wordpress.org/support/users/qchantelnotice/)
 * (@qchantelnotice)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/plugin-causing-error-8/#post-17274470)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/notice-faq_fff5ec.svg)
 * [Wordpress SEO Friendly Accordion FAQ with AI assisted content generation](https://wordpress.org/plugins/notice-faq/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/notice-faq/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/notice-faq/)
 * [Active Topics](https://wordpress.org/support/plugin/notice-faq/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/notice-faq/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/notice-faq/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Quentin Chantel](https://wordpress.org/support/users/qchantelnotice/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/plugin-causing-error-8/#post-17274470)
 * Status: resolved