chnovo7 / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
0 stars 0 forks source link

Cannot Use Scalar Value As An Array #515

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Just upgraded to 0.9.8. However, when I go to add a post (of a custom content 
type created with CCTM), I notice new warnings coming up in regards to any 
image fields that I have created for my post type.  When clicking "Choose 
Image", I still see a list of images within my media library but these errors 
show up before it:

Warning/var/www/sitename/wp-content/plugins/custom-content-type-manager/config/p
ost_selector/_image.php42

Warning/var/www/sitename/wp-content/plugins/custom-content-type-manager/config/p
ost_selector/_image.php43

Warning/var/www/sitename/wp-content/plugins/custom-content-type-manager/config/p
ost_selector/_image.php44

Warning/var/www/sitename/wp-content/plugins/custom-content-type-manager/config/p
ost_selector/_image.php45

Warning/var/www/sitename/wp-content/plugins/custom-content-type-manager/config/p
ost_selector/_image.php46

Warning/var/www/sitename/wp-content/plugins/custom-content-type-manager/config/p
ost_selector/_image.php47

Warning/var/www/sitename/wp-content/plugins/custom-content-type-manager/config/p
ost_selector/_image.php48

Warning/var/www/sitename/wp-content/plugins/custom-content-type-manager/config/p
ost_selector/_image.php48

*****

Note that this does not prevent me from choosing a file from my media library 
and saving the post ("product"). Upon choosing media from the library 
(clicking"select" beneath the small preview images in the list), I also notice 
a message that appears next to the "Choose Image" button after I had first 
clicked it. That error reads:

: Cannot use a scalar value as an array in on line : Cannot use a scalar value 
as an array in on line : Cannot use a scalar value as an array in on line : 
Cannot use a scalar value as an array in on line : Cannot use a scalar value as 
an array in on line : Cannot use a scalar value as an array in on line : Cannot 
use a scalar value as an array in on line

Attempts to isolate the problem by disabling all other plugins and reverting to 
a default Twenty Ten theme did not make those errors go away. Not sure what 
might of changed in this latest upgrade.

*SYSTEM INFO* 
------------------------ 
Plugin Version: 0.9.7.8-pl
WordPress Version: 3.6
PHP Version: 5.3.10-1ubuntu3.6
MySQL Version: 5.5.31-0ubuntu0.12.04.2-log
Server OS: Linux
Language: 
------------------------ 
ACTIVE PLUGINS: 
------------------------ 
CURRENT THEME: Twenty Eleven v.1.6 http://wordpress.org/themes/twentyeleven

Original issue reported on code.google.com by Kat.Leop...@gmail.com on 24 Aug 2013 at 5:05

GoogleCodeExporter commented 8 years ago

Original comment by ever...@fireproofsocks.com on 24 Aug 2013 at 5:10

GoogleCodeExporter commented 8 years ago
Add this to your config/post_selector/_image.php file

CCTM::$search_by = array();

Add it right before the items are added to the array:

CCTM::$search_by = array();
CCTM::$search_by[] = 'post_type';
// ... etc...

Fix will go out soon...

Original comment by ever...@fireproofsocks.com on 24 Aug 2013 at 6:06