WordPress.org

Ready to get started?Download WordPress

Forums

Query Multiple Taxonomies
[resolved] WP3.01 QMT1.3.1 "Array" as string showing on filtered (13 posts)

  1. 10sexyapples
    Member
    Posted 3 years ago #

    This issue just showed up again where the Array ( string, not an actual array ) is showing up when an addterm filter is clicked. It shows up directly after the taxonomy name of whichever taxonomies' terms were clicked to add.

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Are you using the qmt_add_term filter? If so, please paste the code.

  3. 10sexyapples
    Member
    Posted 3 years ago #

    I really need a better way of notifying myself when there is a response here. Again, sorry for the delayed response~

    I'm not using the qmt_add_term_filter, I am using these:

    //QMT: Add base url for Query Multiple Taxonomies-------------------------------------------------//
    function my_qmt_base_url( $url ) {
    	$ptype = get_post_type_object(get_query_var('post_type'));
    	$plural = sanitize_title_with_dashes($ptype->label);
    
    	return get_bloginfo('url') . '/' . $plural;
    }
    add_filter( 'qmt_base_url', 'my_qmt_base_url' );
    
    //QMT: Add title filter for Query Multiple Taxonomies ---------------------------//
    function custom_qmt_term_list_title( $title ) {
      return str_replace(
        array( '<h4>', '</h4>' ),
        array( "<ul><li><h2 class='widgettitle'>", "</h2></li></ul>" ),
        $title
      );
    }
    add_filter( 'qmt_term_list_title', 'custom_qmt_term_list_title' );
    
    //QMT: Remove Canonical Redirect---------------------------//
    function cancel_redirect_canonical( $redirect_url ) {
        if ( is_tax() )
            return false;
    
        return $redirect_url;
    }
    add_filter( 'redirect_canonical', 'cancel_redirect_canonical');
  4. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    There's a good friend of mine I would like you to meet:

    http://php.net/debug_print_backtrace

    I really need a better way of notifying myself when there is a response here. Again, sorry for the delayed response~

    You can click "Add this topic to your favorites" and then subscribe to the feed for your favorites (it will still be a little delayed).

  5. 10sexyapples
    Member
    Posted 3 years ago #

    Thank you for the introduction ... very nice guy, concise and to the point. ;-)

    Just this week, I'm finally getting down and dirty with learning how to debug ... it's time.
    I'm being advised to stop using my dear Coda program, and move on to something like phpStorm to do my work, in order to achieve this ... waah, and I'm reading and absorbing as much info from all over the place as possible ... while still trying to meet my current site deadline. As well, I'm not taking any more work after this.

    I'm going to be concentrating full time on taking my brain to the next level.

    I just did a couple hours reading and exploring all the info I could find on "using debug_print_backtrace()".

    You know though, it's the basic fundamentals that get me. The things that most folks learn in school or classes, and that almost all the help you find on this level expects you to already know, stuff like "where to put a great debugging function like debug_print_backtrace()" and where to look for it's output ... I know, pretty much a big DUH for most people. But I'm home-grown, so, it's a little different for me. I learn by necessity and desire, and always put in the extra time to make sure that what I'm learning is the most recent, most effective, best practice method, so, a little slower, and a lot of the fundamental building blocks are missing.

    As well, most examples I find need to be slightly altered to be applicable to WordPress. Aside from some beginning classes in Basic, back in college ( wanted to be an architect before becoming a pro athlete ), and then publishing a magazine for 13 years, (which gave me my expertise in graphics, computer admin, yadda yadda), all of my recent learning and application has been in direct relation to building in wordpress.

    That said, and to give an example of my point though ... I now understand more about the debug_print_backtrace() function itself and what it does, which I fully comprehend, than how or where exactly to use it. heh.

    Good news is I'm like a cat with a ball of string, so, I'll get there. I go nuts when I have a question in my head and no answer.

    This would also explain why subscribing to the rss feed of my favorites hasn't been so effective at keeping track of responses on here. I have way too many feeds, as I seem to think that I can read 1000+ pages a day. hah.

    As always ... Thanks for all your advice ... and the hospitality of your introductions ... the sponge

  6. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Generally, I use debug_print_backtrace() right at the beginning of my functions, to see what arguments I'm getting and from where:

    function custom_qmt_term_list_title( $title ) {
      debug_print_backtrace();
      ...

    In this particular case, are you sure you didn't modify the plugin directly and forgot about it?

    Also, please let me kwnow the exact version of the plugin you are using.

  7. 10sexyapples
    Member
    Posted 3 years ago #

    I'm pretty darn sure I didn't put my grubby little paws on this one. The issues I was having were all ironed out with the filters you provided pre-uploading it. It's the 1.3.1-alpha version. I just ran Mr. backtrace and emailed you the results~

  8. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Ah... now I know what's going on. You have another one of my plugins running. Let me know the name and the version. Install the development version of it and let me know if that fixes it.

  9. 10sexyapples
    Member
    Posted 3 years ago #

    Yes, I don't know if you remember, but you made category checklist tree work with taxonomies for me ;-) I believe I am still using the latest version. It's 1.1-beta. I couldn't find anything more current than that. My plan is to get this plugin working with jsTree as well, but, I've got to get that cookie issue sorted out with it first.

  10. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Category Checklist Tree wouldn't be the cause, since it doesn't use the scbFramework.

    You need to find the definition of the html() function. It will probably be defined in more than one place.

  11. 10sexyapples
    Member
    Posted 3 years ago #

    haHA! Got it. You worked with Lester on WP-Useronline. He puts his name so big "Lester 'GaMerZ' Chan" that I never saw you there ... man, I've been using that plugin forever too. Well, cool, that clears that up. But there is no more current version of that plugin is there? Should I just rename the function?

  12. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    WP-UserOnline is still being maintained by me. The dev version is 2.80-alpha something.

  13. 10sexyapples
    Member
    Posted 3 years ago #

    Well, hip hip hoorah. All fixed ;-) Thanks Scribu!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic