Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Tuesday, July 3, 2012

[Solution] You are not permitted to use that link to directly access that page Joomla 2.5 Error

If you are having the error "You are not permitted to use that link to directly access that page" on clicking on 'cancel' button in joomla admin inside a component then try the following:


Try selecting a row with a check box and then click edit, once the page loads click cancels, if this doesn't give the error and adding a look to title to edit, something like 


index.php?option=com_myschool&view=student&layout=edit&id=1


and clicking on this and then pressing cancel gives you the error then the following is the quick and easy solution, replace the layout edit with task=subcontrollername.edit and leave rest the same, e.g.

index.php?option=com_myschool&view=student&task=student.edit&id=1
or this also works
index.php?option=com_myschool&task=student.edit&id=1

Note: You will be in a view with plural like views/students/tmpl/default.php but you have to use the subcontroller name of the single one i.e. student.

Thursday, March 24, 2011

Joomla 1.5 admin session timeout error

Yesterday I was running a script in Joomla admin from a custom developed. The script basically uploaded an xml file and entered the blogs from the xml into the site. It was working fine as look as the number of blog/entries in the file were small but when they were large enough to exceed the default joomla session time of 15 min it used to logout admin during the script and I had to start all over again.

I googled for the solution and easily found out that the way to do it is go to Joomla admin of the site then go to:
Site> Global Configuration> System
and at the right bottom you will see an option 'Session Settings' with a value of 15 minutes in 'Session Lifetime', you can simply change it to whatever you like and you are going.

However now comes the reason for writing the post. What I did was try to make this time unlimited. First I tried using '0 minutes' but I think that also uses the default value of 15 minutes because that also logged me out after some time so I tried using the maximum value by pressing and holding 9 for a while. Then I saved and I got logged out and when I tried to login it didn't let me. Yes my admin was kind of blocked as it wasn't giving me error but not letting me in. I tried entering wrong password and it gave me invalid user/pass error but nothing in case of correct user/password. Luckily it was my local site and not some production one, I looked a lot for the place where this value is saved to overwrite it manually but didn't find anything and finally after about an hour I found that it was in Joomla's root directory file configuration.php with a variable of '$lifetime' almost at the end of the file. I change it to 180 and both the issues resolved i.e. I could log back in to admin and the file was also completed in an hour or two without logging me out in between.

However as we know that session time should be kept as low as possible to avoid security breach.

Hope it helps someone.