Page 1 of 1
Strange error
Posted: Thu Mar 19, 2020 12:47 am
by alex4orly
I implemented visitors register on a website
You can check this here :
http://www.beleuramyhome.org.au/villa.php
use villa number 221 to enter
I get this in debug mode (1 error)
Navigated to
http://www.beleuramyhome.org.au/villa.php
villa.php:349 GET
http://www.beleuramyhome.org.au/none 404 (Not Found)
Navigated to
http://www.beleuramyhome.org.au/frontpage.php
In that villa.php on line 349 is the end of the page </html>
My questions are:
1) Why does the URL have an extra /none? Where is that from
2) The starting page - villa.php calls writelog.php with the following :
http://www.beleuramyhome.org.au/writelo ... yvilla=221
But if I enter this call manually into the URL line :
http://www.beleuramyhome.org.au/writelo ... yvilla=221 it works fine
Any idea?
Thanks
Re: Strange error
Posted: Thu Mar 19, 2020 7:22 am
by Pablo
I do not see the error. I have tested in Chrome, FireFox and Edge.
Did you also try it in different browsers?
Re: Strange error
Posted: Thu Mar 19, 2020 8:13 am
by alex4orly
OK, to see the error, please follow this steps
1) Start Chrome
2) Hit F12 to get into Debug mode
3) Then, copy and paste the url :
http://www.beleuramyhome.org.au/
Can you see it now?
Thanks
Re: Strange error
Posted: Thu Mar 19, 2020 8:53 am
by Pablo
No, I do not see the error.
Re: Strange error
Posted: Thu Mar 19, 2020 9:47 pm
by alex4orly
Re: Strange error
Posted: Fri Mar 20, 2020 7:26 am
by Pablo
Do you get the same error if you remove all custom code?
Re: Strange error
Posted: Fri Mar 20, 2020 7:53 am
by alex4orly
Well, what is the point?
This is the home page of the website, It only has in it - WWB standard objects
I have no costum code on this page
Thanks
Re: Strange error
Posted: Fri Mar 20, 2020 8:45 am
by Pablo
Sorry, but I do see custom code on this page.
Please remove all code you have added yourself.
Re: Strange error
Posted: Fri Mar 20, 2020 8:55 am
by alex4orly
It was in the master frame - I removed it already
But the problem is still there
Can you refresh the browser and check again
If you can still see any custom code, can you please point it out, maybe I miss something?
Cheers
Re: Strange error
Posted: Fri Mar 20, 2020 8:59 am
by Pablo
Code: Select all
<script>
var flag = true;
var user = "";
var num = 365;// Set up cookie expiry for one year
// This gets executed only if no cookie was found
function getvilla() /// Through the OK click on the dialog
{
// Get the user input from the dialog
user = document.getElementById("Editbox1").value;
flag = false;
if (user!= "" && user!= null)
{
createCookie("beleura4", user, num);
window.location.href = "http://www.beleuramyhome.org.au/writelog.php?myvilla=" + user;
}
else // Go to the error page
{
window.location.href = "http://www.beleuramyhome.org.au/loginfail.php"
}
}
function createCookie(cookieName,cookieValue,daysToExpire)
{
var date = new Date();
date.setTime(date.getTime()+(daysToExpire*24*60*60*1000));
document.cookie = cookieName + "=" + cookieValue + "; expires=" + date.toGMTString();
}
function accessCookie(cookieName)
{
var name = cookieName + "=";
var allCookieArray = document.cookie.split(';');
for(var i=0; i<allCookieArray.length; i++)
{
var temp = allCookieArray[i].trim();
if (temp.indexOf(name)==0)
{
return temp.substring(name.length,temp.length);
}
}
return "";
}
function checkCookie()
{
user = accessCookie("beleura4");
// This is first time visitor, cookie is not yet there
if (user == "")
{
// Bring up the dialog for user to enter the villa number (Thanks Pablo)
$("#entervilla").dialog("open");
if(flag) // Make the screen hold on, until visitor clicks OK
{
setTimeout(foo, 100);
}
} // else - cookie was found, go to the website
// pass the user / villa number into the php for processing - the PHP script will
// check the villa number validity / registration
var url = "http://www.beleuramyhome.org.au/writelog.php?myvilla=" + user;
//alert(url);
window.location.href = url;//"http://www.beleuramyhome.org.au/writelog.php?myvilla=" + user;
}
</script>
Re: Strange error
Posted: Fri Mar 20, 2020 9:01 am
by Pablo
Also, on my computer there is no error.
Did you try it on another computer to make sure it's not just an issue of your browser?
Re: Strange error
Posted: Fri Mar 20, 2020 11:23 am
by alex4orly
That script you show, is no longer there - please refresh the browser
No, I will have to find another PC with Windows
Thanks for now
Re: Strange error
Posted: Fri Mar 20, 2020 12:18 pm
by Pablo
Re: Strange error
Posted: Sat Mar 21, 2020 5:24 am
by alex4orly
Hello again,
OK, after you pointed it out, I realized that the code was in index.php, not in frontpage.php
1) I tested it on another computer, the same error
2) I deleted ALL the custom code in index.php
3) Tried again, the same error
jquery-1.12.4.min.js:2 GET
http://beleuramyhome.org.au/none 404 (Not Found)
You must have some magic at your end that this error doesn't show up
???
Re: Strange error
Posted: Sat Mar 21, 2020 8:00 am
by Pablo
I have noticed this, in the page background CSS
Maybe this is related?
It looks like you have set the background mode to 'image' but did not selected an image.
Re: Strange error
Posted: Sat Mar 21, 2020 9:14 am
by alex4orly
You are just MAGIC... That was it!
But, I am still unclear, why I had an error and you didn't?
Thanks Pablo