Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    hmm. Thank you for this issue report, tesseraltyme. A tiny detail that I missed and will need to fix as part of a point release.

    I’ll see what I can do regarding it.

    Do you need some help at all filling in the parameter in the meantime? I have to believe passing in an empty string would work in your case, since you’re not trying to directly register it with any object type.

    https://github.com/WebDevStudios/custom-post-type-ui/issues/218

    Thread Starter tesseraltyme

    (@tesseraltyme)

    Hello Michael Beckwith,

    Thank you for your prompt reply. Your below comments led me to do some further testing and I have found two items that seem to represent issues with backward compatibility.

    Several months ago I created a custom post type with two custom taxonomies and then deactivated the plugin after pasting the code into the functions.php file.

    Then today I wanted to add a new custom post type and taxonomy. So I updated and activated cptui plugin and added a taxonomy and post type pair. I erased the code for those original post types and taxonomies from the functions.php file, expecting to put them back with the new code in the export tab.

    However, first the original taxonomies were unattached from their designated post type. So I re-attached them and saved. Then I had to edit the prior existing post type so it would be registered in the export file. (Simply opening in the editor and saving was sufficient) After that, I was able to paste the code for the taxonomies and post types back into my functions.php file and deactivate the plugin. The post types and taxonomies remain functional now.

    Since the plugin worked perfectly, I did not suspect a problem with the export program. But now that I understand it, I will not have the problem again. However, it might be advisable to add some instructions for long time users who want to export code and have pre-existing post types and taxonomies made by cptui.

    Regards,
    Vincent Clark

    PS: I am available to beta test anything you are working on at no charge, gratis.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Ideally, I want to make it as painless as possible to export for use away from the plugin as possible. Your feedback earlier provided a detail that slipped by, and will be fixed in the next release, which will be 1.0.1. I’m likely going to wait till tomorrow morning for it, but plan to as soon as I can in the morning. Hopefully it will take care of many of the most recent bugs reported since yesterday morning when I initially re-released what is now 1.0.0 ??

    Hopefully that makes sense above.

    Thread Starter tesseraltyme

    (@tesseraltyme)

    The initial symptom has been removed in version 1.0.0:D. When I paste the export code into my functions.php file there is no error message. But now I am not able to deactivate the plugin and retain custom post type and custom taxonomy functionality. The post types disappear with deactivation and make export code superfluous.

    Your ‘fix’ certainly added empty string in the offending location. However I am unable to attach a post type to my pre-existing taxonomy as before the fix.

    I do not know if I should start a new topic for this or continue it here.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Checking. I think I have a lead on what may be going on.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If you are willing to edit the files directly, I’ll give you the exact changes I made to this spot to make it work.

    in custom-post-type-ui/inc/import-export.php, on line 169-171, there is the following lines:

    if ( is_array( $taxonomy['object_type'] ) ) {
    	$post_types = 'array( \'' . implode( '\', \'', $taxonomy['object_type'] ) . '\' )';
    }

    Both references to $taxonomy['object_type'] need to be plural, meaning $taxonomy['object_types'] based on my changes from last night.

    Essentially giving you

    if ( is_array( $taxonomy['object_types'] ) ) {
    	$post_types = 'array( \'' . implode( '\', \'', $taxonomy['object_types'] ) . '\' )';
    }
    Thread Starter tesseraltyme

    (@tesseraltyme)

    That worked perfectly. I congratulate you.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    this change will be part of a 1.0.2 update, which will go out once I get a bit more bugs confirmed and resolved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘'Get Code' fatal error in Taxonomy’ is closed to new replies.