ElkArte Community

Project Support => Support => Topic started by: Egbune on August 30, 2017, 05:12:02 am

Title: Home page empty on first visit
Post by: Egbune on August 30, 2017, 05:12:02 am

Thank you sir, sorry would like to know why my homepage on simpleportal goes blank on first visit. Or you didn't experience such? [member]@ahrasis[/member]
Title: Re: Home page empty on first vitis
Post by: ahrasis on August 30, 2017, 06:43:58 am
I am not sure about that. @Spuds knows much more and should be able to help when he is free.
Title: Re: Home page empty on first vitis
Post by: Spuds on August 30, 2017, 07:53:38 am
Possible the visibility settings are wrong ... be sure to have some blocks visible to guests.
Title: Re: Home page empty on first vitis
Post by: Egbune on August 30, 2017, 02:41:34 pm
Quote from: Spuds – Possible the visibility settings are wrong ... be sure to have some blocks visible to guests.

They are visible to 'Everyone'. The only problem is that it only appears when you refresh the page twice or more but at first visit, it is completely blank.
Title: Re: Home page empty on first vitis
Post by: emanuele on August 30, 2017, 05:29:58 pm
Discussion moved to its own topic because it is worth. ;)

You host has a kind of anti-bot redirection (javascript based), it may also be that one, though I didn't see any problem on first visit.
Title: Re: Home page empty on first vitis
Post by: Egbune on August 30, 2017, 05:57:03 pm
see what I mean in the below screenshot...
I use infinityfree hosting
Title: Re: Home page empty on first visit
Post by: Jorin on August 31, 2017, 01:26:15 am
Can anyone please post a link to the board?
Title: Re: Home page empty on first visit
Post by: ahrasis on August 31, 2017, 01:33:06 am
http://www.lotsofstory.com/

I visited and found it working fine. The only problem is his redirect is not working properly, probably due to wrong redirect code. This happens when you type http://lotsofstory.com instead of http://www.lotsofstory.com and this code "?i=1" is added to the url.
Title: Re: Home page empty on first visit
Post by: Jorin on August 31, 2017, 01:40:23 am
The board index is empty with IE too, even with the leading www. But it seems @ahrasis is right about the "?i=1", but I have the problem even with www.lotsofstory.com.

Edit: After closing the browser tab and then clicking on the link again, the board index is shown and the link is working now.  :o
Title: Re: Home page empty on first visit
Post by: [SiNaN] on August 31, 2017, 02:46:30 am
This is indeed caused by ?i=1 added to the query string by some additional code you have on your site. If there are unknown query string parameters as such, the page is not considered the portal front page. You can add this query string parameter as an exception to prevent this by making the following change:

Sources/Portal.subs.php

Code: (Find) [Select]
		'wwwRedirect' => true,

Code: (Replace) [Select]
		'wwwRedirect' => true,
'i' => true,
Title: Re: Home page empty on first visit
Post by: Egbune on August 31, 2017, 08:13:07 am
Thanks for the support guys, but I don't seem to see where to get this done.

@SiNaN pls where do I put that code, please I am new to all these and you could be more descriptive. Please
Title: Re: Home page empty on first visit
Post by: radu81 on August 31, 2017, 09:30:12 am
with an ftp client like Filezilla go to /sources/subs and edit the file Portal.subs.php . Sinan wrote above what you have to find and replace