Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4840 closed defect (bug) (no action required)

bp_legacy_theme_new_activity_comment doesn't use custom comment.php when using theme compat

Reported by: modemlooper's profile modemlooper Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.7
Component: Activity Keywords: reporter-feedback
Cc:

Description

If you edit comment.php it shows the edits with a fresh page but ajaxing a new comment pulls comment.php from the BuddyPress folder instead of using the overridden file in a theme folder.

Change History (11)

#1 @boonebgorges
12 years ago

  • Keywords reporter-feedback added

I assume you're talking about activity/comment.php.

I'm not able to reproduce the issue you're reporting. Steps:

  1. In my active theme (twentytwelve), create a directory buddypress/activity/
  2. Copy buddypress/bp-templates/bp-legacy/buddypress/activity/comment.php to twentytwelve/buddypress/activity/comment.php
  3. Make a modification to the latter file so I'll know what's being loaded
  4. When loading example.com/activity, I see my modifications, so I know it's pulling from my theme
  5. Posted a comment via AJAX (both using the Comment button - top-level comment - and the Reply links). The markup came back from the server containing my modifications, which means it's coming from my theme.

Am I interpreting your problem correctly?

#2 @modemlooper
12 years ago

try the permalink page

#3 @boonebgorges
12 years ago

Can't reproduce it there either. Can you share the specifics of your setup?

#4 @modemlooper
12 years ago

I changed the entry.php to entry-permalink.php as I needed to customize activity specifically on permaink but the comment.php is the same file with a small mod. I had this setup prior to 1.7

in entry.php I removed comment code but require commenting on entry-permink.php

I'm going to try flipping name and leave permalink as entry.php as that is the commenting page but bp get template should not care what the parent page is when calling comment.php

#5 @boonebgorges
12 years ago

Can you please share enough details about what you're doing so that I can attempt to reproduce it? I'm not sure what you mean by "I changed the entry.php to entry-permalink.php". If you made such a change, then how is BuddyPress loading it? Are you using theme compat? If so, in what sense was it working prior to 1.7, when there was no theme compat?

#6 @r-a-y
12 years ago

modemlooper: You are using an older version of the bp-legacy theme.

We made some changes to the activity permalink template (See #4659).

The activity permalink template can now be found at /bp-legacy/buddypress/activity/single/home.php.

Ahh, the consequences of working with bleeding-edge code!

#7 @modemlooper
12 years ago

Trying to narrow it down, I think it's a theme switch and ajax issue. I'm using a theme switch to show the mobile theme and I think the ajax doesn't understand and is getting the legacy file from the buddypress plugin folder because the activated theme doesn't have the bp template files in it.

Ray, i'm using home.php from beta.

Last edited 12 years ago by modemlooper (previous) (diff)

#8 @modemlooper
12 years ago

Ok, thats the issue. I put the files in the active theme folder and then used the mobile theme and it pulled in the custom file.

I'm filtering the theme

add_filter( 'stylesheet'
add_filter( 'template'

The BuddyPress ajax is not taking this into consideration. Thoughts? I think I didn't have a problem before because I could include ajax.php and buddypress-functions.php can not overridden

Version 0, edited 12 years ago by modemlooper (next)

#9 @modemlooper
12 years ago

I think I fixed it. I shuffled some code to load the theme switch earlier and it worked. Weird that a custom entry.php was fine but the comment.php was not.

#10 @boonebgorges
12 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#11 @boonebgorges
12 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.