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
Version 4.2.3 depreciated function logs
Support (Resolved)
Sungod
|
Posted: 18 May 2017 06:00 AM |
|
|
|
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
|
Posted: 18 May 2017 12:30 PM |
# 1
|
|
Developer
|
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
|
Posted: 18 May 2017 12:51 PM |
# 2
|
|
|
We started the project with 4.2.3 but we have added an addon for the CKEditor.
|
|
|
PutYourLightsOn
|
Posted: 18 May 2017 01:05 PM |
# 3
|
|
Developer
|
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
|
Posted: 18 May 2017 01:34 PM |
# 4
|
|
|
Will get this checked during working hours.
Thank you.
|
|
|
|
Sungod
|
Posted: 19 May 2017 02:07 AM |
# 6
|
|
|
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
|
Posted: 19 May 2017 02:39 AM |
# 7
|
|
Developer
|
Use the add_to_foot() function to include scripts and avoid the deprecation warning.
ee()->cp->add_to_foot();
|
|
|
Sungod
|
Posted: 19 May 2017 04:52 AM |
# 8
|
|
|
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
|
Posted: 19 May 2017 06:32 AM |
# 9
|
|
Developer
|
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?
|
|
|