XF 2.1 [SOLVED] Ajax functionality lost after making template modification

asprin

Active member
So in order for the member profile to look something like this:

1590908634957.png

I went ahead and made a template modification such as the following:

The part I intend to replace
1590908796713.png

The replaced part
1590908857487.png

This adds the link on the profile page, but when I click on any of the sibling links (Profile Posts, About, Latest Activity etc), the page gets redirected to the section that I linked as opposed to showing up on the same profile page via Ajax (with the loading... message showing up until the ajax call gets complete). For example, say I click on "About" - the result is a page redirection with the following view:
1590909112061.webp

If I disable the template modification, it goes back to working as expected. What am I missing here?

I'm yet to add a controller method to handle the new link action (Username History) but that shouldn't mess with the existing actions, right? FWIW, I've also created the class extension with a empty (for now) method.

1590909206142.webp
 
I think I found the reason. Console had this printed out:

1590909537897.png

EDIT: TickTackk beat me to it. Just had to make another template modification on the same template for pane.

Just wondering if the two can be clubbed into a single modification 🤔
 
Last edited:
Top Bottom