nexusfallout / wordpress-custom-content-type-manager

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

image, relation, and media fields incorrectly store result from CCTM::get_thumbnail() field #286

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem? (Be specific enough so that someone
else can make the plugin fail for themselves. Remember: if the issue can't
be fixed if it can't be reproduced!)

While attempting to open an existing Custom Content Image Field (with images 
data populated) for editing I'm getting the following error;

Fatal error: Cannot use assign-op operators with overloaded objects nor string 
offsets in 
C:\Domains\xxxxx\wp-content\plugins\custom-content-type-manager\includes\CCTM.ph
p on line 1666

This only seems to be happening to the image field - text feilds open fine.

What is the expected output? What do you see instead?

Does the problem continue if you disable all other plugins? (Conflicts
between plugins are easily the #1 cause of errors, so it's important to
isolate the issue):

Please copy and paste the system information that appears in a yellow
textarea when you click on "Report a Bug" on any CCTM admin screen (this
includes the version of the
plugin, the version of PHP, the version of MySQL, a list of other active
plugins etc.):

*SYSTEM INFO* 
------------------------ 
Plugin Version: 0.9.5.5-pl
WordPress Version: 3.3.1
PHP Version: 5.2.6
MySQL Version: 5.1.45-community
Server OS: WINNT
------------------------ 
Other Active plugins: 
 * Disable Autosave v. []
 * Avatars v.10.5 [http://www.sterling-adventures.co.uk/blog/2008/03/01/avatars-plugin/]
 * Admin Menu Editor v.1.1.5 [http://w-shadow.com/blog/2008/12/20/admin-menu-editor-for-wordpress/]
 * Akismet v.2.5.4 [http://akismet.com/?return=true]
 * Capability Manager v.1.3.2 [http://alkivia.org/wordpress/capsman]
 * cforms v.11.7.1 [http://www.deliciousdays.com/cforms-plugin]
 * Dashboard Heaven v.1.0 [http://dave.kinkead.com.au/dashboard-heaven/]
 * Duplicate Post v.2.2 [http://lopo.it/duplicate-post-plugin/]
 * Emu2 - Email Users 2 v.0.83b [http://1manfactory.com/emu2]
 * Enhanced Meta Widget v.3.0.0 [http://neurodawg.wordpress.com/enhanced-meta-widget/]
 * Global Hide/Remove Admin Bar Plugin v.1.1 [http://fischercreativemedia.com/wordpress-plugins/global-hide-admin-bar-plugin/]
 * Global Content Blocks v.1.3 [http://wordpress-plugins.org/global-content-blocks]
 * Google Analytics for WordPress v.4.2.2 [http://yoast.com/wordpress/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=google-analytics-for-wordpress&utm_content=v420]
 * Hide Update Reminder v.1.2 [http://www.stuffbysarah.net/wordpress-plugins/remove-update-reminder/]
 * Instant Weekly Roundup v.1.0.0 [http://www.clickonf5.org/instant-weekly-roundup]
 * MapPress Easy Google Maps v.2.38 [http://www.wphostreviews.com/mappress]
 * My Calendar v.1.10.0 [http://www.joedolson.com/articles/my-calendar/]
 * My Videotag v.1.4.6 [http://toxigeek.com/plugin-my-videotag]
 * NextGEN Gallery v.1.9.1 [http://alexrabe.de/?page_id=80]
 * Post Sorting Reloaded v.1.3 [http://www.gab.ro/post-sorting-reloaded/]
 * Postie v.1.4.3 [http://blog.robfelty.com/plugins/postie]
 * Redirect My Login v.1.0.5 [http://www.jfarthing.com/wordpress-plugins/redirect-my-login-plugin]
 * Register Plus v.3.5.1 [http://skullbit.com/wordpress-plugin/register-plus/]
 * Role Scoper v.1.3.51 [http://agapetry.net/]
 * SEO Ultimate v.7.2.1 [http://www.seodesignsolutions.com/wordpress-seo/]
 * Shopp v.1.1.7 [http://shopplugin.net]
 * Simple Post Template v.1.1.0.1 [http://clifgriffin.com/2008/10/28/simple-post-template-wordpress-plugin/]
 * Simply Exclude v.1.7.9.2 [http://www.codehooligans.com/projects/wordpress/simply-exclude/]
 * Stop Spammer Registrations Plugin v.2.20 [http://www.BlogsEye.com/]
 * Subscribe to Comments Reloaded v.2.0.2 [http://wordpress.org/extend/plugins/subscribe-to-comments-reloaded/]
 * Subscribe2 v.7.0.1 [http://subscribe2.wordpress.com]
 * TinyMCE Advanced v.3.4.5 [http://www.laptoptips.ca/projects/tinymce-advanced/]
 * uCan Post v.1.0.09 [http://cartpauj.com/projects/ucan-post-plugin]
 * WassUp v.1.8.3 [http://www.wpwp.org]
 * WordPress Print This Section v.2.0.4 [http://twodeuces.com]
 * Artiss YouTube Embed v.2.3.1 [http://www.artiss.co.uk/artiss-youtube-embed]
 * Youtube Feeder v.1.0.7 [http://andrewensley.com/projects/youtube-feeder-wordpress-plugin/]

Original issue reported on code.google.com by pswsa...@gmail.com on 10 Jan 2012 at 11:23

GoogleCodeExporter commented 8 years ago
Are you opening the field definition?  Or just a post that is using this field?

Could you please attach your .cctm.json exported definitions file (under the 
CCTM --> Tools menu).  Thanks.

Original comment by ever...@fireproofsocks.com on 10 Jan 2012 at 11:26

GoogleCodeExporter commented 8 years ago
Yes the error occurs when trying to open the field definition to edit the 
button label. The spcific feild is Ride Feature Image (rideimg). Definitions 
file attached.

Original comment by pswsa...@gmail.com on 11 Jan 2012 at 4:20

Attachments:

GoogleCodeExporter commented 8 years ago
I tested this on the oldest version of PHP I have: 5.2.13 and I can't reproduce 
this.

There's not much going on line 1666 -- it's inside the parse function, which 
gets used a lot (not just for field definitions).  Specifically this:

        $hash['help'] = '<ul>';
        foreach ($all_placeholders as $p) {
            $hash['help'] .= "<li>[+$p+]</li>";
        }
        $hash['help'] .= '</ul>';

You can safely comment out that entire block: it's only to aid you if/when you 
customize the manager HTML 
(http://code.google.com/p/wordpress-custom-content-type-manager/wiki/Customizing
ManagerHTML)

My hunch is that it's a Windows error.  If you could set me up with an FTP 
login, I could verify that suspicion.  It could also be something with PHP 
5.2.6 (or a combination thereof).  

Original comment by ever...@fireproofsocks.com on 11 Jan 2012 at 5:08

GoogleCodeExporter commented 8 years ago
what email can I send the login credentials to?

Original comment by pswsa...@gmail.com on 11 Jan 2012 at 8:22

GoogleCodeExporter commented 8 years ago
http://fireproofsocks.com/contact/

Original comment by ever...@fireproofsocks.com on 11 Jan 2012 at 8:27

GoogleCodeExporter commented 8 years ago
Interesting.  The $hash parameter is coming into the function not as an 
associative array, but as an IMAGE. 

Man, this server is slooooooow.  Hard to track this down when page loads take 
so long.

But I HAVE identified the problem: the image, relation, and media fields are 
incorrectly handling the returned value from the CCTM::get_thumbnail() 
function.  To reproduce this issue, you must set a default value for one of 
those fields.

To fix this, ~line 234, the code has been updated to this:

            $hash = $Q->get_post($def['default_value']);
            $hash['thumbnail_url'] = CCTM::get_thumbnail($def['default_value']);

This will be included in the next patch.  For now, you can update to the dev 
version.

Committed revision 488525.

Original comment by ever...@fireproofsocks.com on 12 Jan 2012 at 3:56