XF 1.4 Permalink showing full thread url, not post url

#1
Recently I noticed that the permalink for posts inside of a thread are redirecting to the full thread title instead of the direct post url, although conversations permalinks work just fine. Any idea why the post permalink gives me only the thread url instead?
 
#6
I could really only guess that this is add-on related.
Been a bit busy lately, however I did tried to disable all addons and I still get the same. When I get an alert (like, quote) the permlink works fine and it points me to the exact post however the permalinks of all posts inside of the thread are simply not working and I get the full thread link instead, no #post number extension.
 
#8
Haven't tried that yet, however I haven't done any recent changes except applying security patches for xenforo (although I've overwritten the .php files that I replaced with default ones and no change) and permalinks always worked with the style I'm using.
 
#9
I have tried to use default style and disable addons from admincp and it's the same result, permalinks only show full thread link, no #post-xxxx number after that.
 

Mike

XenForo developer
Staff member
#10
Honestly, I'm pretty baffled. If you submit a ticket referencing this thread, I'll try to get to the bottom of it.
 
#11
No active updates for current license anymore so probably won't be able to submit a ticket. By the way, I can still see the data-href post number through inspect it's just not added at the end of the href link.
 
#13
More information:
For some reason the generated template file converts the $post object to string:
Code:
    <a href="' . XenForo_Template_Helper_Core::link('threads/post-permalink', $thread, array(
'post' => '' . $post
))
If I edit it and change it to:
Code:
<a href="' . XenForo_Template_Helper_Core::link('threads/post-permalink', $thread, array(
'post' => $post
))
Then it starts working properly.

Any clues on what can cause this behavior?
 
#18
Seems like mistery is solved (thanks for posting @Erel) as I also use php7 but just didn't paid attention to this the day i've updated my php version and well I would have expected xenforo 1.4 to support php7 or atleast release a compatibility patch.

@Mike, I suppose there will be a compatibility patch release for php7? Because downgrading php version doesn't really makes sense and upgrading to 1.5 just for that is a bit dissapointing.
 
Last edited:

Mike

XenForo developer
Staff member
#19
There are no plans for a compatibility patch. XenForo 1.4 is currently receiving security patches only. I would have to recommend using the workaround posted if the other solutions aren't viable.
 
#20
There are no plans for a compatibility patch. XenForo 1.4 is currently receiving security patches only. I would have to recommend using the workaround posted if the other solutions aren't viable.
Yes, already planning this but a workaround is not the same with a compatibility patch. Also could you tell me what gets changed during rebuilding master data? Any chance for permissions or other settings to be modified? Using a custom template, not xenforo default one (of course I'll make a backup before)

Followed the workaround thread and it's fixed. Thank you!
 
Last edited:
Top