Tagged: taxonomy, WordPress 3.5
- This topic has 21 replies, 4 voices, and was last updated 8 years, 9 months ago by
Steve.
-
AuthorPosts
-
-
December 10, 2012 at 8:46 am #527
Carla ChalmersMemberWhen trying to save a CPT with a custom taxonomy item checked I receive the following errors:
Warning: Illegal offset type in isset or empty in /home/wwcbiz/public_html/debbie/wp-includes/taxonomy.php on line 231
Warning: Illegal offset type in isset or empty in /home/wwcbiz/public_html/debbie/wp-includes/taxonomy.php on line 231
Warning: Cannot modify header information – headers already sent by (output started at /home/wwcbiz/public_html/debbie/wp-includes/taxonomy.php:231) in /home/wwcbiz/public_html/debbie/wp-includes/pluggable.php on line 876
-
December 10, 2012 at 3:10 pm #528
SteveKeymaster@txhorselady– Can you post the code you are using to register the CPT and Taxonomy?
-
December 10, 2012 at 4:16 pm #531
Carla ChalmersMemberHi Steve,
I tried activating a taxonomy for a CPT but received the error. As a test I installed Piklist on a blank 3.5 site and created a Demo Type in the Piklist Demo Taxonomy. I then added a Piklist demo and selected my demo type taxonomy item . Upon trying to save the Demo I received the same error. I have not implemented any of my own code on this site.Thanks,
Carla -
December 11, 2012 at 1:05 am #539
James McMemberI can reproduce same error message from my install with Demo Type taxonomy and Demo CPT with WP development version (3.5-RC6-23166)
Also, selecting/editing Demo Type taxonomies for Demos works fine in quick edit menu.
Further, when editing a Demo, unchecking the current Demo Type and saving works fine, however, after the page reloads, the previous Demo Type is still selected.
-
December 11, 2012 at 1:55 am #541
James McMemberFound a typo in class-piklist-taxonomy.php:
public static function process_form($term_id, $taxonomny_id)
-
December 11, 2012 at 7:44 am #542
SteveKeymaster@James_Mc– good find on the Typo… doesn’t seem to fix the issue… but nice find!
-
December 11, 2012 at 10:04 am #546
James McMember@Steve – thanks. I thought maybe you had Romny on the brain when you were coding it.
The taxonomy_exists() function isn’t to happy about handing it a nested array. I guess you can’t create those taxonomy field checkboxes with field names like: name=”taxonomy[piklist_demo_type][]”.
You can fix the warnings by modifying the function get_field_name() in class-piklist-form.php with something like the following:
if ($scope == 'taxonomy')
{
$name = 'tax_input[' . $field . '][]';
}
else
{
$name = $prefix . ($scope ? $scope . (self::is_media() && isset($GLOBALS['piklist_attachment']) ? '_' . $GLOBALS['piklist_attachment']->ID: '') . '[' : null) . $field . ($scope ? ']' : null) . (is_numeric($index) ? '[]' : null);
}
Not sure if this is how you would want to actually fix this, there might be side effects somewhere else. But it works it seems.
-
December 11, 2012 at 1:42 pm #549
Carla ChalmersMemberAny more ideas on this issue?
-
December 11, 2012 at 2:00 pm #550
James McMemberIt would seem as though naming fields as ‘taxonomy’ creates a collision with how wordpress does things. The troubleshooting I’ve done should help Steve spend his time reworking his solution as opposed to finding the bug. With 3.5 now out, I am sure he is busy with some loose ends.
-
December 11, 2012 at 2:02 pm #551
Carla ChalmersMember@James … Cool , Thank you for the update. I’m building a multisite and the success of it is dependent upon CPTs with Taxonomies. I love Piklist
-
December 11, 2012 at 3:36 pm #552
James McMember@txhorselady – I agree, Piklist is pretty cool. I am patiently waiting for it to develop into something that has all the features I need (actually, all I really need is for relationships to mature :hint:) to do some cool plugins/add-ons as well. Ultimately its authors are going to develop it to suit their immediate needs first. Can’t wait for the customer and product add ons!
-
December 13, 2012 at 12:55 pm #555
SteveKeymaster@James Mc– Typo fixed in 0.7.1
-
December 13, 2012 at 12:55 pm #556
SteveKeymaster@txhorselady– We’re having a difficult time duplicating this error. Still working on it!
-
December 13, 2012 at 7:32 pm #560
Carla ChalmersMemberI just installed Piklist on a new blank single site WP 3.5 install. I am able to create the Demo Type. I clicked save without changing the status and it saved as a draft. Then I went back in and changed the status to Demo and clicked ok. The status didn’t change. Then I clicked on Update and I received the same error as before. There are no other plugins installed on this site.
-
December 15, 2012 at 5:39 am #562
James McMemberWhat versions of PHP is everyone using? I am currently using PHP 5.2.10 and the error messages are present.
-
December 15, 2012 at 10:10 am #563
Carla ChalmersMember5.4.9 for me
-
December 18, 2012 at 11:29 am #564
Carla ChalmersMemberLooks like I’m going to have to move on with my project and drop Piklist. I really don’t want to but my client is getting impatient with me 🙁
-
December 18, 2012 at 11:52 am #565
SteveKeymaster@txhorselady– We haven’t been able to duplicate, however, I have a temporary solution for you. Log these error notices instead of showing them on screen.
1) Open your wp-config.php file (probably through ftp) and edit it.
2) Paste this code in. Make sure it’s above the line that says That’s all, stop editing! Happy blogging.
define('WP_DEBUG', true); // or false
if (WP_DEBUG) {
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);
}
That should temporarily solve the issue.
You can view detailed instructions on the WP Codex.
-
December 18, 2012 at 1:53 pm #566
Carla ChalmersMemberOk, so I thought I would have a try again before I put in your code Steve. I was still getting the error on the demo post that I created. Then I created another post and all was ok. Now everything seems to work fine. Maybe some type of initialization error?
-
December 19, 2012 at 11:01 am #570
SteveKeymaster@txhorselady– That is really odd. Either way, we will still try and fix.
-
May 10, 2013 at 6:30 am #820
exacks44MemberHi,
Does a real fix exist for this issue now? I have the same problem, but I am not as lucky as txhorselady, because it doesn’t fix by itself :/
Maybe you have found a clue!
Thank you
-
May 10, 2013 at 3:04 pm #821
SteveKeymasterThis will be fixed in the next version.
-
-
AuthorPosts
- You must be logged in to reply to this topic.