Currently facing the following error in the cp_js_end hook.

Undefined property: Javascript::$session 

it looks like the session class isn`t loading anymore in EE 2.6+ It whas working in older versions.

Is this a bug, or did EL change the way of loading the session class in some other order?


function cp_js_end()

Just found a way to avoid this problem

I change the hook from cp_js_end to the cp_menu_array hook.

Will work
function cp_menu_array($menu)

Please make sure that you not returning your JS but add your js with to the with ee()->cp->add_to_foot('<script type="text/javascript"></script>');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.