RTO-Websites / dynamic-conditions

A simple plugin to show/hide elementor-widgets based on dynamic tags
51 stars 18 forks source link

Critical Error in version 1.7.0 #79

Closed m-vdv closed 1 month ago

m-vdv commented 1 month ago

Latest plugin version 1.7.0 causes a critical error in WordPress.

Error Description • Error Type: Uncaught TypeError • Message: DynamicConditions\Admin\DynamicConditionsAdmin::addConditionFields(): Argument #1 ($element) must be of type Elementor\Element_Base, ElementorPro\Modules\Popup\Documents\Document given. • File and Line: The error occurs in wp-includes/class-wp-hook.php on line 324. • Call Stack Trace: The error originates from the function DynamicConditionsAdmin::addConditionFields() and involves various Elementor plugin files.

Key Points of the Error

  1. TypeError: This means that a function was expecting a specific type of argument, but received a different type.
  2. Expected Type: Elementor\Element_Base
  3. Given Type: ElementorPro\Modules\Popup\Documents\Document
  4. Problematic Function: DynamicConditionsAdmin::addConditionFields()

Likely Cause

The addConditionFields function in the DynamicConditions plugin is being called with an argument that does not match the expected type.

image

tstokes8040 commented 1 month ago

I can also confirm this!

lucaseatp commented 1 month ago

also having the same issue

crazypsycho commented 1 month ago

Sorry for that. Seems that a popup isnt an Base_Element. I made a hotfix.

tstokes8040 commented 1 month ago

Confirmed that v1.7.1 works for me. @crazypsycho thanks!