Fieldtype

Developer
Supported

Expresso

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From PutYourLightsOn

     

You must be logged in to post.

Version 4.2.3 depreciated function logs

Support (Resolved)

Sungod
Sungod

Deprecated function add_to_head() called in /path/user/addons/expresso/ft.expresso.php on line 291.

Deprecated since 2.8. Use CP::add_to_foot() for scripts instead.

Do we have to worry regarding this notice in developer logs?
PHP is latest PHP 7

PutYourLightsOn
# 1
Developer
PutYourLightsOn

This line of code doesn’t seem to exist in version 4.2.3, so perhaps it is an old log? Can you please try updating to the latest version 4.2.4 and see if it makes any difference? Either way there is nothing to worry about, this is just a deprecation warning.

Sungod
# 2
Sungod

We started the project with 4.2.3 but we have added an addon for the CKEditor.

PutYourLightsOn
# 3
Developer
PutYourLightsOn

If you have customised ft.expresso.php then that may be the cause of the deprecation log. If that’s the case then it may be worthwhile fixing the warning so it doesn’t affect future ExpressionEngine updates.

Sungod
# 4
Sungod

Will get this checked during working hours.

Thank you.

PutYourLightsOn
# 5
Developer
PutYourLightsOn

Sure thing.

Sungod
# 6
Sungod

We have added a chart library for expresso.
We need to load its JS in both control panel and in front.
This error it seems comes from loading the js when using add_to_head().
Can we load the JS without add_to_head() for Ckeditor addon via Expresso in control panel?

PutYourLightsOn
# 7
Developer
PutYourLightsOn

Use the add_to_foot() function to include scripts and avoid the deprecation warning.

ee()->cp->add_to_foot(); 

 

Sungod
# 8
Sungod

We had tried that and it didn’t work.
The charting library loads correctly with add_to_head()
and doesn’t work with ee()->cp->add_to_foot();

PutYourLightsOn
# 9
Developer
PutYourLightsOn

The library probably has to be loaded earlier, you could try placing the add_to_foot() call earlier in the method. Have you tried loading the CKEditor plugin as described in the docs?