1

I have updated my EE2 to EE4, I am now updating Channel Image addon.

he works in the control panel, but in template I get a white page.

If I debug the addon I get the following problem:

at get_field_setting function i get no data back, it goes wrong at (return ee()->cache->get('channel_images/field_settings/'.$field_id);)

Can someone help with this?

With save goes well

(ee()->cache->save('channel_images/field_settings/'.$field_id,unserialize(base64_decode($query->row('field_settings'))),500);)

The code is:

public function get_field_settings($field_id)
{
    if (isset($this->session->cache['channel_images']['field_settings'][$field_id]) == FALSE)
    {
        $query = ee()->db->select('field_settings')->from('exp_channel_fields')->where('field_id', $field_id)->get();
                    if ($query->num_rows() == 0) return FALSE;

                    ee()->cache->save('channel_images/field_settings/'.$field_id,unserialize(base64_decode($query->row('field_settings'))),500);

            }

    return ee()->cache->get('channel_images/field_settings/'.$field_id);
}
  • Looks like there's a problem with the cache?! Did you clear it before updating? Did you upgrade from EE2 to EE4 without going thru EE3? – Benoit L Aug 3 '18 at 18:47

Your Answer

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

Browse other questions tagged or ask your own question.