Running the latest version of Choices (Version 2.4) and WordPress 4.2.2. Its a fresh install and have disabled all plugins.
When trying to add a logo image to a Logo/Partner List element in the Template Builder, the Upload button does not work and throws an “Uncaught TypeError: wp.media is not a function” error in the Console.
To resolve this I have changed the following line 57 of class-adminpages.php (in /choices/framework/php/):
if(function_exists('wp_enqueue_media') && (isset($_REQUEST['page']) && $_REQUEST['page'] == 'avia'))
to the following:
if(function_exists('wp_enqueue_media') && (isset($_REQUEST['page']) && ($_REQUEST['page'] == 'avia') || ($_REQUEST['page'] == 'templates')))
Basically adding $_REQUEST[‘page’] == ‘templates’ in the if statement. This loads wp_enqueue_media() on the admin.php?page=templates page and allows the Upload button to initiate the built in Media upload functionality.
Unfortunately this doesn’t completely fix the problem. I can click the Upload button and choose the image file fine. It even displays a small version of the chosen file below the Upload button.
However after saving the changes, no image appears on the front end. If I go back in and have a look at what was uploaded in the Logo/Partner List element, the image I chose has been replaced by an image of a film reel!
Has anyone found a fix to this issue? I’ve searched the forums but can’t see anything that seems similar.
The forum ‘Choices’ is closed to new topics and replies.