Icy Phoenix
Old Support Topics - [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
casimedicos [ Fri 19 Oct, 2012 00:00 ]
Post subject: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
I can not add Mirrors
Add or edit mirrors for this file, make sure to verify all the information because the file will be submitted to the database
When I try to add mirrors for any file in ACP > Downloads > Manage Files > Edit, a window pops up but it only shows my homepage instead of whatever it should be.
Thank you in advance.
is the same old error as this
http://www.icyphoenix.com/viewtopic.php?t=4195
Joshua203 [ Fri 19 Oct, 2012 08:07 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
Could you attach a screenshot of the popup to show us what you see?
casimedicos [ Fri 19 Oct, 2012 11:36 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
screenshot in attachment
thanks
Joshua203 [ Fri 19 Oct, 2012 12:39 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
I'm sorry but whatever I try I can not reproduce this error
Maybe someone else can confirm?
casimedicos [ Fri 19 Oct, 2012 13:10 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
I'm sorry but whatever I try I can not reproduce this error
Maybe someone else can confirm?
i have 2 ip installations
and the bug is in both

Joshua203 [ Sat 20 Oct, 2012 14:41 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
Well even after receiving a test login from you, I still can not reproduce the error at your test site, check the screenshot:

casimedicos [ Sat 20 Oct, 2012 16:01 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
i do not understsnd why you can post mirrors, i can not
Joshua203 [ Sat 20 Oct, 2012 16:13 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
i do not understsnd why you can post mirrors, i can not
I must admit I don't understand either but the first thing I would try in this case is fully clear your browser.
casimedicos [ Sat 20 Oct, 2012 16:26 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
I must admit I don't understand either but the first thing I would try in this case is fully clear your browser.
i try to doit in opera,safari,internet explorer, chrome, firefox and allways the result is the same
????
thanks
spydie [ Sat 20 Oct, 2012 21:47 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
just checked on my site, and i have the same error.
it just shows my index when i click on add mirrors.
Joshua203 [ Sun 21 Oct, 2012 00:10 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
I've edited a couple of posts to remove stuff about the second found bug, I guess you may expect a fix for that very soon

spydie [ Sun 21 Oct, 2012 00:23 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
maybe something to do with admin acount ??
Joshua203 [ Sun 21 Oct, 2012 00:26 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
I'm sure you read it Spydie

casimedicos [ Wed 24 Oct, 2012 18:42 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
I've edited a couple of posts to remove stuff about the second found bug, I guess you may expect a fix for that very soon

thanks
Joshua203 [ Sun 04 Nov, 2012 10:53 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
Getting back to this, I really think this is a cookie problem because I don't have this problem at your site ..not while being logged in with the test account either, I just keep getting the mirror popup like it should.
Has either one of you tried to delete their cookies?
spydie [ Sun 04 Nov, 2012 11:49 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
tried that before posting here, and did´nt work Josh
Joshua203 [ Sun 04 Nov, 2012 12:38 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
Ok Spydie ..thanks,
At this moment I can confirm I have the same problem on Casimedicos's test site when I use FF, chrome, safari and opera... but not when I use IE9
spydie [ Sun 04 Nov, 2012 12:48 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
confirmed.
just tested with IE9 and it works on my site. all other browsers fail

Joshua203 [ Sun 04 Nov, 2012 12:50 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
Thanks again spydie, maybe you can add a link to this thread to your bugreport in the bugtracker to save MG some analising time
EDIT:
or just add the info we just found out now

spydie [ Sun 04 Nov, 2012 15:07 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
could not edit the BUG report, but added it as coment
mort [ Tue 06 Nov, 2012 11:00 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
confirmed. just tested with IE9 and it works on my site. all other browsers fail

Has anyone had a look at the files in question, because if the path is not scripted as absolute (Meaning there may be something missing in the path like a / or two there's two //, or a dot too many if it's a unix path as .././) Because when on-submit don't work and goes to the default index etc, either the path is wrong or the Form action is wrong?
Just check in the browser where you are and where you are being redirected to and what action is in the "input Submit" and form action?
It just strikes me as odd that IE can decipher the path and the others can't?
Edit:
@casimedicos
I suspect the the form action on the page you are having problems with is something like <form action="$some-var" ?
Can you go to the page where you are just about to submit whatever you have done to a mirror (Without submitting it) and look at view-source and see what <form action="$some-var" looks like in html. And maybe try it with IE and the other browsers to see what the differences, if any may be?
spydie [ Tue 06 Nov, 2012 12:18 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
Mort.
this happens in acp downloads -add download. when you click on add mirrors
mort [ Tue 06 Nov, 2012 13:11 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
I don't really have a lot of time to run through this but the cause of different browsers responding in different ways is not generally a scripting problem, but more on how paths are set.
IE for instance hates unix paths and yet appears to be the only one that works - - ?
And this is not a new problem.
http://www.icyphoenix.com/viewtopic.php?t=4195
If I get time I'll go through the motions, install Icy on the box and see if I can support my theory of a path problem.
And that's Maybe - Because I'm up to my armpits working on this not even half-finished project of my own.
http://bitzagames.com/demo/index.php
spydie [ Tue 06 Nov, 2012 17:55 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
this looks to be the problematic part
<script type="text/javascript">
<!--
var win = null;
var error_msg = "";
var mirror_mode = false;
function set_mirror_mode(status)
{
mirror_mode = status;
}
function new_window(mypage, myname, w, h, pos, infocus)
{
if(pos == "random")
{
myleft = (screen.width) ? Math.floor(Math.random()*(screen.width-w)) : 100;
mytop = (screen.height) ? Math.floor(Math.random()*((screen.height-h)-75)) : 100;
}
if(pos == "center")
{
myleft = (screen.width) ? (screen.width-w) / 2 : 100;
mytop = (screen.height) ? (screen.height-h) / 2 : 100;
}
else if((pos != 'center' && pos != "random") || pos == null)
{
myleft = 0;
mytop = 20
}
settings = "width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=no";
win = window.open(mypage, myname, settings);
win.focus();
}
if(0)
{
new_window('admin_pa_file.php?mode=mirrors&file_id=3&sid=2f55f20b243b6a66032d1741065de232', 'fileupload', '600','450', 'center', 'front');
}
function checkAddForm()
{
if(mirror_mode)
{
new_window('admin_pa_file.php?mode=mirrors&file_id=3&sid=2f55f20b243b6a66032d1741065de232', 'fileupload', '600','450', 'center', 'front');
return false;
}
error_msg = "";
if (document.form.cat_id.value == -1)
{
error_msg = "You can't add file to category that does not allow files on it";
}
if(document.form.name.value == "")
{
if(error_msg != "")
{
error_msg += "\n";
}
error_msg += "Please fill the file name field";
}
if(document.form.long_desc.value == "")
{
if(error_msg != "")
{
error_msg += "\n";
}
error_msg += "Please fill the file long descritpion field";
}
if(error_msg != "")
{
alert(error_msg);
error_msg = "";
return false;
}
else
{
return true;
}
}
// -->
</script>
this is out of frame source code
especialy this part looks suspicious to me
win = window.open(mypage, myname, settings);
mypage ????
mort [ Tue 06 Nov, 2012 22:37 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
mypage ????
That's only an anchor var - could be anything? And maybe MG should consider renaming all the vars in that script because MyPage, MyThis or MyThat are all too commonly used and could be conflicting with other scripts?
Dunno! but, here's the original script before MG fixed it till it broke!
<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
<!--
/****************************************************
Note: This has only been tested with Google Chrome and FireFox Browsers
And can't be guaranteed to work with others.
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}
// -->
</script>
There's more detail here ->
http://emillionforum.com/Thread-nea...n-t-get-blocked
I also did mention somewhere else that the latest FF is having some problems with some scripts, and that doesn't help the cause either.
I'll tell you what's killing it:
Only IE can get past the iframe at the top of admin - iframe.top - admin-index-top or something like that.
No other browser, or tools will parse the full html or script links to the pafiledb add a file template etc, you can't even use view-source with anything other than IE - So yeah! there is a problem.
And the only other thing that I found was pafiledb/functions.php x2 - CALUE=" and not VALUE=" if that's a typo, but it's certainly not the problem.
;(
Mighty Gorgon [ Sun 11 Nov, 2012 12:05 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
Can someone try just by replacing this code?
OPEN
templates/common/acp/pa_admin_file_edit
FIND
if({ADD_MIRRORS})
{
new_window('{U_MIRRORS_PAGE}', 'fileupload', '600','450', 'center', 'front');
}
function checkAddForm()
{
if(mirror_mode)
{
new_window('{U_MIRRORS_PAGE}', 'fileupload', '600','450', 'center', 'front');
return false;
}
REPLACE WITH
if({ADD_MIRRORS})
{
redirect_url = '{U_MIRRORS_PAGE}';
redirect_url = redirect_url.replace(/&/g, '&');
new_window(redirect_url, 'fileupload', '600', '450', 'center', 'front');
}
function checkAddForm()
{
if(mirror_mode)
{
redirect_url = '{U_MIRRORS_PAGE}';
redirect_url = redirect_url.replace(/&/g, '&');
new_window(redirect_url, 'fileupload', '600', '450', 'center', 'front');
return false;
}
spydie [ Sun 11 Nov, 2012 13:06 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
don´t seem to be able to find that line´s , MG
You´re shure, it´s this file ??
I´ll take it that it´s this one.
templates/common/acp/pa_admin_file_edit.tpl
Edit.
fix work´s for me
Mighty Gorgon [ Sun 11 Nov, 2012 13:29 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
You are right, I have amended file name.

spydie [ Sun 11 Nov, 2012 15:48 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
maybe you fix file path in BUG tracker aswell.
TheSteffen [ Mon 12 Nov, 2012 13:18 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
maybe you fix file path in BUG tracker aswell.
I fixed the path in BUG tracker... thanks spydie
casimedicos [ Thu 15 Nov, 2012 12:41 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
the problem is not solved
in ie9, opne blank popup
in other browsers, continue the original problem

spydie [ Thu 15 Nov, 2012 14:53 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
here´s some screen´s , so you see it work´s at least for me
IE 9
and Chrome

Mighty Gorgon [ Sat 24 Nov, 2012 10:29 ]
Post subject: Re: [BUG] IP 2.0 - I Can Not Use Pafiledb Mirrors
the problem is not solved
in ie9, opne blank popup
in other browsers, continue the original problem

I got it working properly on any browser. Can you please empty your cache and try again?