Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)

  • kodacollider
    Participant

    @kodacollider

    I had to disable activity update comments from displaying as their own items entirely to fix this, but it looks like doing so did. I used the code from this thread.

    function my_bp_activities_include_activity_types( $retval ) {
    // only allow the following activity types to be shown
        $retval['action'] = array(
         //   'activity_update',
            'activity_comment',
            'new_blog_post',
            'new_blog_comment',
            'friendship_created',
            'created_group',
        );
     
        return $retval;
    }
    add_filter( 'bp_after_has_activities_parse_args', 'my_bp_activities_include_activity_types' );

    Weird issue all around.


    kodacollider
    Participant

    @kodacollider

    I just noticed — this may or may not be the cause of the problem — the activity feed on my profile seems to be generating duplicate comment IDs.

    When showing several conversations, there are multiple instances of, for example li#acomment-31… one in one conversation, and then another li#acomment-31 in the next convo down. This clearly shouldn’t be happening but it seems too blatant to have not been caught/fixed by now? What could be causing this?

    Thanks again in advance.


    kodacollider
    Participant

    @kodacollider

    Clarification: It looks like the link does work on other users’ profiles, but it doesn’t work when trying to reply to a comment on a user’s own profile.


    kodacollider
    Participant

    @kodacollider

    Wow, I just found the culprit.

    It was this code in my child theme’s functions.php file that was intended to remove empty HTML tags:

    add_filter('the_content', 'remove_empty_tags_recursive', 20, 1);
    function remove_empty_tags_recursive ($str, $repto = NULL) {
            $str = force_balance_tags($str);
            if (!is_string ($str) || trim ($str) == '')
            return $str;
            return preg_replace (
                  '~\s?<p>(\s|&nbsp;)+</p>\s?~',
                 !is_string ($repto) ? '' : $repto,
               $str
            );
    }

    kodacollider
    Participant

    @kodacollider

    Thanks for taking the time to check in — yes, I’ve tested it with a default theme and the problem isn’t there. So it’s something in my child theme, though I’m really not sure what.

    ‘Backbone’ is a bit vague to me, but I do see both of the scripts mentioned above being loaded. I’ve played a bit with the ordering of these and haven’t seen a difference, but it may have something to do with that. I’m just not sure how to tell. Like I mentioned, my console is clean when I load the page.


    kodacollider
    Participant

    @kodacollider

    I could really use a hand figuring this out, I can’t do much with my site while it’s printing out scripts as plaintext. This is the only page/component I’ve seen this issue on, and I’ve tried fiddling with the placement of my js files quite a bit to no avail.

    Could someone perhaps give me a bit more insight into what files are actually at work here so that I can narrow my focus a bit as I attempt to troubleshoot?

    Thank you.


    kodacollider
    Participant

    @kodacollider

    Thanks for the information. I’m using a child theme of Twenty Sixteen. Looking at the source of the page, I see:

    /wp-includes/js/backbone.min.js?ver=1.2.3
    /wp-includes/js/wp-backbone.min.js?ver=4.7.2

    Both being loaded. I don’t see any errors in my console either. Any ideas?


    kodacollider
    Participant

    @kodacollider

    Trying to take a look at the template file. Found it at: /wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/assets/_attachments/cover-images/index.php

    In that file, I see the code:

    <script id="tmpl-bp-cover-image-delete" type="text/html">
    	<# if ( 'user' === data.object ) { #>
    		<p><?php _e( "If you'd like to delete your current cover image but not upload a new one, please use the delete Cover Image button.", 'buddypress' ); ?></p>
    		<p><a class="button edit" id="bp-delete-cover-image" href="#"><?php esc_html_e( 'Delete My Cover Image', 'buddypress' ); ?></a></p>
    	<# } else if ( 'group' === data.object ) { #>
    		<p><?php _e( "If you'd like to remove the existing group cover image but not upload a new one, please use the delete group cover image button.", 'buddypress' ); ?></p>
    		<p><a class="button edit" id="bp-delete-cover-image" href="#"><?php esc_html_e( 'Delete Group Cover Image', 'buddypress' ); ?></a></p>
    	<# } else { #>
    		<?php do_action( 'bp_attachments_cover_image_delete_template' ); ?>
    	<# } #>
    </script>

    However, on my site itself, the source comes out missing the script tag, and the angle brackets are in the form of lt; gt; etc.

    Any ideas? Could use some help on this.

Viewing 8 replies - 1 through 8 (of 8 total)
Skip to toolbar