I've got a problem with the admin menu..
It isn't working porperly. When I click a menu, like 'News', nothing happens and the status bar says there is an error on the page
I can still perform some actions (for example, when I change the URL to admin.php?action=addnews I can still add news) but when I try to delete news, something prevents it
I think main.js in the js folder is the cause of this. Since I'm not really into javascript I haven't tried to edit it yet.
Does anyone know what the problem is? Thanks for your reply
Cas
sorry to bump an old thread, but did this issue ever get resolved?
i just installed version 3.4 and get the same problem - any javascript links in the admin panel are inaccessible, in ie, firefox, chrome. in internet explorers status bar i can double click the yellow triangle and get the error 'object required'.
can anyone help? i really wanna use this script for a site but currently it's unusable.
Access: Admin
Total Posts: 1395
Joined: 2006-05-19
I just tested the admin panel in FF 3.6, IE8, Chrome 4. The menu links all work as they should do. Can you tell me which versions of each browser you're using so I can try replicate the problem?
I just tested the admin panel in FF 3.6, IE8, Chrome 4. The menu links all work as they should do. Can you tell me which versions of each browser you're using so I can try replicate the problem?
firefox 3.5.7, chrome 3.0.195.38, internet explorer 8.
i'm not convinced it's a problem with the browser though, as it works perfectly on my windows pc running apache and php but not on the webhost. the webhost is also windows, running apache but i'm suspecting they have something disabled that is required...
...towards the end of the installation on the webhost, there is a very very brief flash of what looks like an error message relating to either fclose() or fopen() which is only displayed for a fraction of a second - i tried emptying the database and reinstalling while running video capture software to capture the exact frame but can't replicate the error, although the symptoms are the same.
is there a reason why fopen() and fclose() would be disabled on the server-side and would that in turn affect the javascript calls to display the admin menu? how would i test this?
Access: Admin
Total Posts: 1395
Joined: 2006-05-19
The installer uses fopen and fwrite to write the database connection settings to the db.php file, it might be throwing an error because it's unable to write to it. Did you try CHMODing that file to to 777? If you managed to login previously it would suggest that it wrote the information to the file anyway so that shouldn't matter.
There is no reason that any PHP server side settings could affect the client side Javascript code. The only thing I can think of is if the server is altering the document, possibly adding something to it before it outputs it to the browser.
Just had a thought at what might be causing this to happen. When you're logged into the admin panel, can you view the source of that page and look for any php errors, was thinking that if there was an error in the php code where the menu is you may not see those errors as they might be hidden in a menu that has yet to be expanded.
The installer uses fopen and fwrite to write the database connection settings to the db.php file, it might be throwing an error because it's unable to write to it. Did you try CHMODing that file to to 777? If you managed to login previously it would suggest that it wrote the information to the file anyway so that shouldn't matter.
to all intents and purposes, it seems all is well - the tables etc are created and populated and it's all green lights on the admin panel side. i did the equivalent of CHMOD in the webhosts file manager on db.php - i even tried giving write access to every file and folder down the tree but still nothing.
Quote:
Just had a thought at what might be causing this to happen. When you're logged into the admin panel, can you view the source of that page and look for any php errors, was thinking that if there was an error in the php code where the menu is you may not see those errors as they might be hidden in a menu that has yet to be expanded.
this gets weirder (well to me anyways, not being php programmer). on looking at the source code near to the none functioning options button i spied the links for what would be under the options section when clicked.
if i append any one of them to the admin.php url it will open the requested page fine, with the full section expanded in the menu - news, options etc. upon clicking the same header in the menu it doesn't collapse and likewise other menus still do not expand upong clicking.
HOWEVER the first time i appended one of the actions to admin.php (the 'accounts' page i believe it was) i got the following message, which i can't replicate:
Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2003): Can't connect to MySQL server on 'mysql8.brinkster.com' (10060) in C:\Sites\Single39\SITENAME\webroot\music\mysqliclass.php on line 56
Warning: mysqli_select_db() expects parameter 1 to be mysqli, boolean given in
C:\Sites\Single39\SITENAME\webroot\music\mysqliclass.php on line 57
Warning: mysqli_prepare() expects parameter 1 to be mysqli, boolean given in
C:\Sites\Single39\SITENAME\webroot\music\mysqliclass.php on line 104
Unable to prepare: SELECT registrationaccess,registrationallow,commentslength,furlextension,furlenabled,
furlprefix,furldirname,spamtime,spammsg,commentmsg,commentapprovemsg,timezone,
bannedmsg,catdelimiter,useimgverification,salt,version,scriptpath,sendtodelay,
regcomment,commentsnotify,registernotify,emailnotify,unapprovednotify,filetime
FROM news30_options WHERE 1
Arguments:
Access: Admin
Total Posts: 1395
Joined: 2006-05-19
This reminds me of a similar problem I ran into a few years ago when working on a different project using SQL Server instead of MySQL. At random times the connection to the database would just refuse to connect for no good reason. I ended up having to write a loop into that script that would basically say, if unable to connect, keep trying until it connects. This is a long shot but it'll do no harm in trying.
If you edit the mysqliclass.php file, around line 56~ you'll see this
Access: Admin
Total Posts: 1395
Joined: 2006-05-19
The reason the menu links aren't working is because the script is unable to connect to the MySQL server for whatever reason, this is causing an error which is outputting text that is messing out the menu links. I would consult your host and ask if they have any sort of limit on the MySQL server, perhaps a limit on the amount of connections or the amount of queries ran within a certain time frame.
Editing files to have all the menu links shown constantly isn't really addressing the problem instead just masking it. The problem may occur on other sections of the script unless the MySQL error has been fixed.
i could well believe that the issue lies with the webhost, however in the past they haven't been forthcoming in terms of support - their motto is 'use the tools we provide' and something like joomla is waaaaaay overkill for what is required.
since the actual links to all the menu options are present in the source code of the displayed pages, if i wanted to replace where the links are generated to bypass the javascript dropdowns and display them directly, which file should i be looking at?
Access: Admin
Total Posts: 1395
Joined: 2006-05-19
admin.php is where you'd need to edit. Specifically search for any reference to the function "DataAccess::getaccess", for example the first reference to that function is this code
Code:
if(DataAccess::getaccess("news")){
which is basically checking to see if the user has access to the news section (via access levels), if they have access then it'll show that menu, so instead you could change that to something that will always be true, something like
Code:
$i = 1; if($i == 1){
This way it'll show the menu regardless of if you have access to it or not.
You'd need to do this for every instance of DataAccess::getaccess in that file so it may take a bit of time.