Forum Replies Created

Viewing 15 replies - 16 through 30 (of 167 total)
  • I just did something like Philip was talking about and thought it was very straight forward thanks to a good example. That said, I could see something like this becoming an option that you could trigger by appending something to the column name like serial_my_custom_field.

    This is a shame. Plugin worked well for me. @ken, can the plugin do a check at some point to see if a CPT is set to Public or not? If not, give the user a specific warning/error? Perhaps something like that can avoid reviews like this.

    Thread Starter syrupcore

    (@syrupcore)

    Thank you both. It’s custom theme, designed by https://ecotrust.org/about-us/staff/#sarah-cline. I used the Roots base theme to jump start the code. It’s good stuff!

    4.0+ should help content creators deal with the headache at the intersection of responsive images, retina displays and art direction.

    Thread Starter syrupcore

    (@syrupcore)

    Glad to help but I don’t think it had anything to do with my debugging suggestion though – @coachcoen also disabled some plugins at the same time.

    Think it’s coming down to a race condition when setting up custom post types (but I still don’t get why that’d end in attachment mayhem). If you do ever find out, I’m still interested to know.

    Thread Starter syrupcore

    (@syrupcore)

    Think I’m on the right path. The referrer for all of those are internal.

    https://www.mysite.org/cbfm/

    But still not sure what to do about it.

    Thread Starter syrupcore

    (@syrupcore)

    PS. Site has only been live for two days and we not that busy. Perhaps some sort of cyclical problem?

    Thread Starter syrupcore

    (@syrupcore)

    EDIT on the second question:

    Second Question: How to match for /foobar, /foobar/ and /foobar/index.html

    Is this the best way: ^/foodbar(/|/index.html|)$ with regex set to ‘On’?

    Seems to be working in limited testing but I fear I’m missing something.

    Thanks.

    Thread Starter syrupcore

    (@syrupcore)

    Thread Starter syrupcore

    (@syrupcore)

    Ah thanks for posting @coachcoen. That’s sounds a little different from my issue. I could still see the events aggregation pages at /events put couldn’t see individual events at /events/my-event (with permalinks on).

    Thread Starter syrupcore

    (@syrupcore)

    @coachcoen

    Can you add this to your footer.php template please (or wherever is clever) and report back what it prints out?

    <?php
    global $wp_query;
    echo '<pre>';
    var_dump($wp_query->query_vars);
    echo '</pre>';
    ?>

    Mostly curious to see if you’re getting ‘attachment’ too.

    Thread Starter syrupcore

    (@syrupcore)

    Thanks very much @brook. I think I’ve sorted it out but I’ve been fooled before. ?? I’ll include what seems to have fixed it but also my plugin list in case it helps @alessiafabbri (or me if it breaks again!)

    Here’s my list:

    Advanced Custom Fields - Version 4.3.4
    Advanced Custom Fields: Code Area - Version 1.0.0
    Advanced Custom Fields: Flexible Content Field - Version 1.1.1
    Advanced Custom Fields: Gallery Field - Version 1.1.1
    Advanced Custom Fields: Repeater Field - Version 1.1.1
    AJAX Thumbnail Rebuild - Version 1.09
    Site Customizations - Version 0.2 ( * mine)
    Write Panel - Version 0.2 (* mine)
    Enable Media Replace - Version 2.9.5
    Force Regenerate Thumbnails - Version 2.0.3
    Manual Image Crop - Version 1.04
    Post Types Order - Version 1.6.8
    Relevanssi - Version 3.3.4
    Term Management Tools - Version 1.1.3
    The Events Calendar - Version 3.5.1
    Theia Smart Thumbnails - Version 1.2.1
    UberMenu 2 - Version 2.4.0.3
    WordPress SEO - Version 1.5.2.5
    WP Retina 2x - Version 1.9.2

    Within my Site Customizations Plugin I create about 9 CPTs using this class. What seemed to have caused the problem was this class was registering the post types on the WP’s init action with a priority of 10 (Github link) while The Event Calendar’s add_hooks method did the same add_action( 'init', array( $this, 'init'), 10 ); on line 338 of /lib/the-events-calendar.class.php which in turns calls register_post_types.

    If I set my CPT’s init hook to priorty 11, all is well in WP land. Huzzah! What I don’t yet understand is why it’s important for Tribe to be first! If I set mine to 9 or Tribe’s to 20, I get the 404s and the attachment weirdness again. In the interest of learning and avoiding days of face planting in the future, I’d really love to understand the why behind this.

    If I add this to my footer

    global $wp_query;
    var_dump($wp_query->query_vars);

    point my browser at “https://localhost/event/struktur-event/&#8221; and don’t set Tribe to a higher priority I get this out (snipped)

    array(61) {
      ["attachment"]=>
      string(14) "struktur-event"

    And, just to be clear, everything else about The Events Calender still works in this state. The admin, the list page, the calender… just no single event pages. Additionally, according to Debug This->Post Types->All Post Types the tribe_events post type is registered. Obviously, the adding events in the admin wouldn’t work if this weren’t the case. So what’s with the attachment post type??

    If I ‘fix’ the priorites, var_dump returns what I’d expect (snipped).

    array(65) {
      ["page"]=>
      int(0)
      ["tribe_events"]=>
      string(14) "struktur-event"
      ["post_type"]=>
      string(12) "tribe_events"

    Finally, when I print out the tribe_events CPT object with either priority setting, they are identical.

    Seems like perhaps it doesn’t actually have to do with the CPTs themselves at all but something about CPTs setting up rewrite rules? I did experiment with flush_rewrite_rules at various stages with no luck until I found the priority thing.

    Thanks for any insight.

    ———————————————–
    PS. A generated the active plugin list by clicking on ‘active’ in the admin menu and then running the following in my console. Included here in case it helps anyone else get their list up!

    jQuery('.plugin-title').each(function(){
        var name, version;
    
        name = jQuery(this).find('strong').text() ;
        version = jQuery(this).next('td').find('.active').text();
        version = version.split(' | ')
    
        console.log( name + " - " + version[0]);
    
    });
    Thread Starter syrupcore

    (@syrupcore)

    Cheers Mikko.

    Thread Starter syrupcore

    (@syrupcore)

    Just tried setting Fuzzy to ‘always’ and got result totals that make a little more sense.

    Query	#	Hits
    farm	2	71
    farms	2	62
    ocean	2	41
    oceans	2	23
    Thread Starter syrupcore

    (@syrupcore)

    Can’t edit a previous post but with regards to enabling/disabling plugins/mojo… I had it working in my local instance, enabled a a part of plugin that broke it (which registered custom post types), disabled that section of the plugin again and it is still not working. I have no idea how to debug this.

    Back to one of my original questions… Any idea why it’s matching for attachments when tribe events are their own post type?

    Just to be sure I don’t have some conflicting CPT I ran:

    mysql> select id, post_name, post_type, post_status from wp_posts  where post_type LIKE '%event%';
    +------+----------------------------------+--------------+-------------+
    | id   | post_name                        | post_type    | post_status |
    +------+----------------------------------+--------------+-------------+
    | 4655 | test-event                       | tribe_events | draft       |
    | 5470 | awards-party-2014                | tribe_events | publish     |
    | 7202 | local-hero-awards-ceremony       | tribe_events | publish     |
    | 8621 | oregon-berry-festival            | tribe_events | publish     |
    | 8625 | oregon-berry-festival-2          | tribe_events | publish     |
    | 8627 | struktur-event                   | tribe_events | publish     |
    | 8630 | 2013-women-of-achievement-awards | tribe_events | publish     |
    +------+----------------------------------+--------------+-------------+
    11 rows in set (0.01 sec)
Viewing 15 replies - 16 through 30 (of 167 total)