texasguy911
Member
Posted 1 year ago #
I have the 1.0.7 version and it has a bug that at least comes from 1.0.6 or maybe earlier (though I think 1.0.4 might have been fine...).
So, I have a loop with an image field inside.
In the post, when I create a few rows of the loop and I update each image, the URL of the image I update gets copied to every other image of other rows. Thus, I cannot update other images because all rows duplicate the same URL.
Javascript bug?
It happens when I click "insert into post" the image and right after all the URLs are the same for all rows in the same loop....
http://wordpress.org/extend/plugins/custom-field-suite/
texasguy911
Member
Posted 1 year ago #
And now I have the error all of the sudden on each page:
Fatal error: Call to a member function load_value() on a non-object in /home/wp-content/plugins/custom-field-suite/core/api.php on line 99
texasguy911 - thanks for reporting. You've been very helpful thus far.
The loop bug has been fixed, and the fix will be released along with 1.0.8.
As for the Fatal Error: I haven't been able to duplicate the issue. Have you been trying to add your own custom field types? The only thing I can think of right now is that a field was added with a field type that no longer exists.
texasguy911
Member
Posted 1 year ago #
Not sure, in the evening will trying to get to the bottom of this. Will post later what I find.
BTW, when do you plan to release 1.0.8?
It'll get released right after we figure out the Fatal Error issue you've been experiencing.
texasguy911
Member
Posted 1 year ago #
Well this is the dump for the $field object
stdClass Object
(
[id] => 27
[name] => project_name
[label] => Project Name
[type] => text
[instructions] => Enter here project name
[post_id] => 183
[parent_id] => 0
[weight] => 0
[options] => a:1:{s:13:"default_value";s:0:"";}
)
The error happens on the very first loop through $fields.
All that looks fine.
Can you paste your template code now (or add it to pastebin.com)?
texasguy911
Member
Posted 1 year ago #
The code you're using to display CFS data on your site.
E.g.
$data = $cfs->get();
foreach ($data as $field_name => $field_value) {
...
}
texasguy911
Member
Posted 1 year ago #
Not sure if it is my code, just deleted 1.0.7, put 1.0.4 back and it is back working no problem.
p*_h_p-c&h*ef.com - remove everything that is not a letter
texasguy911
Member
Posted 1 year ago #
I can paste in different versions until it gets broken, thus we would know at least what version breaks it, then you would have a ball park idea what was changed.
texasguy911
Member
Posted 1 year ago #
Versions 1.0.6 and up break it.
1.0.4 and 1.0.5 are fine.
texasguy911
Member
Posted 1 year ago #
Template that drives front page and contact us.
http://pastebin.com/amJapQYA
It's hard to debug without being able to see your PHP code.
The plugin was changed slightly in 1.0.6 to make it easier for developers to add custom field types. Each field type now extends a generic field class (cfs_Field). I don't see how that would cause the error you're seeing though.
The error happens on the very first loop through $fields.
Maybe you could show your loop code? ^
texasguy911
Member
Posted 1 year ago #
See the post above yours for a pastebin link.
Cool, thanks. I'll look at it shortly.
texasguy911
Member
Posted 1 year ago #
For this template: http://pastebin.com/amJapQYA
Try removing all instances of this:
$cfs = new Cfs();
texasguy911
Member
Posted 1 year ago #
$cfs already exists (it's created at the top of plugins/custom-field-suite/cfs.php). If it's undefined in your template, try:
global $cfs;
instead of
$cfs = new Cfs();
texasguy911
Member
Posted 1 year ago #
Ok, so for the first pastebin file.
If I DO NOT use $cfs = new Cfs(); then I get textfields fine but IMAGE fields are empty.
If I DO use $cfs = new Cfs(); then everything works fine, it returns images as well.
Tested with 1.0.5
Any chance you could switch back to 1.0.7 and give me a temporary /admin login?
texasguy911
Member
Posted 1 year ago #
quickly pastebin your email with 1 hour expire, I'll send the login
texasguy911
Member
Posted 1 year ago #
sent
PS: if you want to contact me, email me, I get it on my phone.