Viewing 21 reply threads
  • Author
    Posts
    • #527

      When 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

    • #528
      Steve
      Keymaster

      @txhorselady– Can you post the code you are using to register the CPT and Taxonomy?

    • #531

      Hi 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

    • #539
      James Mc
      Member

      I 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.

    • #541
      James Mc
      Member

      Found a typo in class-piklist-taxonomy.php:

      public static function process_form($term_id, $taxonomny_id)

    • #542
      Steve
      Keymaster

      @James_Mc– good find on the Typo… doesn’t seem to fix the issue… but nice find!

    • #546
      James Mc
      Member

      @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.

    • #549

      Any more ideas on this issue?

    • #550
      James Mc
      Member

      It 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.

    • #551

      @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

    • #552
      James Mc
      Member

      @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!

    • #555
      Steve
      Keymaster

      @James Mc– Typo fixed in 0.7.1

    • #556
      Steve
      Keymaster

      @txhorselady– We’re having a difficult time duplicating this error. Still working on it!

    • #560

      I 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.

    • #562
      James Mc
      Member

      What versions of PHP is everyone using? I am currently using PHP 5.2.10 and the error messages are present.

    • #563

      5.4.9 for me

    • #564

      Looks 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 🙁

    • #565
      Steve
      Keymaster

      @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.

    • #566

      Ok, 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?

    • #570
      Steve
      Keymaster

      @txhorselady– That is really odd. Either way, we will still try and fix.

    • #820
      exacks44
      Member

      Hi,

      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

    • #821
      Steve
      Keymaster

      This will be fixed in the next version.

Viewing 21 reply threads
  • You must be logged in to reply to this topic.