By Donnie Rollins on Tuesday, 25 July 2017
Posted in General
Replies 15
Likes 0
Views 494
Votes 0
Hello,

My client is having an issue when going to Easy Blog > Posts > Preview Post. It redirects to the home page with the URL below.

https://ktb.org/news-events/ktb-blog?view=entry&layout=preview&uid=42.105

Actual URL: https://ktb.org/ktb-blog/sample-summer

We do use sh404SEF.

Thanks.
Donnie
Can you update your Joomla backend and FTP access at http://stackideas.com/dashboard/site so we can better have a check?

Also can i have the permission to purge all of your existing SEF URL link from your Sh404sef is because it will cached those URL in Sh404sef.
·
Tuesday, 25 July 2017 10:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Arlex,

I provide the login information. Secondly I manually cleared the cache for the entire site under System > Clear Cache

My developer said NOT to press PURGE because we would lose SEF URL's that are needed.

Donnie
·
Monday, 07 August 2017 21:54
·
0 Likes
·
0 Votes
·
0 Comments
·
It seems like I was unable to access your backend, you can check my attached screenshot below what it require me to enter that security code.

My developer said NOT to press PURGE because we would lose SEF URL's that are needed.

Perhaps you can consult with your developer and see whether we can only clear Easyblog SEF URL?
Because those SEF URL can be regenerate back once purge those SEF URL from the SH404sef.

By the way, regarding with you issue, may i know how to replicate this?

Is it you click preview post link from backend > Easyblog > post > edit existing post > click on preview > then it will redirect on the frontpage and display this link?

[gist type="php"]
https://ktb.org/news-events/ktb-blog?view=entry&layout=preview&uid=42.105
[/gist]

If that is the case, thus the URL generated did not go through sh404SEF, but you need to preview the post in frontend or his URL won't be correct, the reason for this is because sh404SEF plugin does not run in backend and the URLs are not processed.

if the issue is preview the post on frontend, I need to check further on this.
·
Monday, 07 August 2017 22:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Is it you click preview post link from backend > Easyblog > post > edit existing post > click on preview > then it will redirect on the frontpage and display this link?
YES

Added RSFIREWALL password
·
Tuesday, 08 August 2017 06:41
·
0 Likes
·
0 Votes
·
0 Comments
·
It seems like you provided that RSfirewall password is not working.

By the way, can you try download my attached file and replace into this following file location and see how it goes?
JoomlaFolder/administrator/components/com_easyblog/includes/post/post.php
·
Tuesday, 08 August 2017 11:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Try again
·
Wednesday, 09 August 2017 07:20
·
0 Likes
·
0 Votes
·
0 Comments
·
I already help you applied the fix into your site and i also realised Sh404sef doesn't retrieve the correct menu item when preview blog post from backend, this is the file i also modified on your site -> /public_html/administrator/components/com_sh404sef/sh404sef.class.php , can you check again is it work fine now?
·
Wednesday, 09 August 2017 11:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks. This is working. Will this fix work after we run the update to 404SEF?
·
Wednesday, 09 August 2017 22:48
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome Donnie, if i recall correctly some of our customer already tried to report this similar issue to Sh404sef, but some how our customer didn't get back to us what is the status when they consult with Sh404sef.

What i did from this php file -> JoomlaFolder/administrator/components/com_sh404sef/sh404sef.class.php, treat the Joomla trying to retrieve frontend menu because now the situation is you click preview link from backend instead of Frontend, if you click preview from Frontend blog post, it will work perfectly fine.


if (JFactory::getApplication()->isAdmin()) {
// Here we are tricking Joomla to assume that we are on the front end now.
JFactory::$application = JApplication::getInstance('site');
$menu = JFactory::getApplication()->getMenu();

// Update the "application" back so that it knows it's in the administrator area.
JFactory::$application = JApplication::getInstance('administrator');
}


So when you update your Sh404sef in next release version, these temporary hack code will lost, but you can refer on my attached screenshot below which line you can put back these hack code in the future.
·
Thursday, 10 August 2017 10:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing the code you updated. I wanted to report an odd issue since the fix was applied. The client is having an issue with this Blog Post.

https://www.ktb.org/ktb-blog/gcaa-cat-1-winner-muenster

So the issue I have is I publish the post but after I click the link for the post it becomes unpublished again. Is this related to the fix applied? I spend about an hour troubleshooting, clearing the cache and testing.

Donnie
·
Friday, 11 August 2017 06:24
·
0 Likes
·
0 Votes
·
0 Comments
·
It seems like this blog post you have set unpublished date, you can check my attached screenshot below.

Once I remove this unpublished date, it will work fine now.

The reason why it keep unpublished is because this blog post should auto unpublished it based on the date.

Can you check again is it work fine now?
·
Friday, 11 August 2017 11:04
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post