I am trying to make some changes in my Drupal 7 site's view. But it gives me this error
Changes cannot be made to a locked view.
Multiple users are not logged into the site.
Please any one can help me?
Thanks.
There is a break lock link in the view itself. click on the link.
What i observed is that when i change the name of my root folder of drupal website on localhost this error occurred.
This can be removed by clicking on break this lock link appearing on top of view itself.
delete the row for "Yourview" in the table "views_object_cache"
I faced this problem several times. Please make sure that you have logged in using only one admin account at a time even though you are using multiple browsers. Also, make sure that you have logged out of the admin account in other browsers before you close them.
If you currently logged in as the same user (admin) in more than one browser, Logging out of one fixed the problem.
After logging out if you still have the problem force logout all users (empty the session table)
TRUNCATE `sessions`;
Related
Occasionally I run into a problem logging into the Magento admin panel. The username and password I enter is correct and the url in the browser window tells me that I have logged in correctly (ie: I see domain.com/index.php/admin/areallylongstring), however the login window is displayed again. No error message telling me that the log in details are incorrect is displayed, I am just routed back to the log in window. Has anyone come across this before and can anyone please suggest a solution?
Thanks!
Try start a private browser session and see if you can login, if so clear your cookies for the website and you should be able to login.
I occasionally get this problem, next time I get it I will dig into the code with my debugger to see what is actually going on.
This problem arises due to multiple reasons and the cheapest solution for this will be comment out the following lines in one of core files of magento.
FILE :- app/code/core/Mage/Core/Model/Session/Abstract/Varien.php.
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()//,
//dependes which versin of mage you are using, you may comment these as well
//$this->getCookie()->getDomain(),
//$this->getCookie()->isSecure(),
//$this->getCookie()->getHttponly()
);
Find out above code in that file and then comment out those three cookies as shown above.
But as I said it is the cheapest and easiest solution that you can go with. For more information, checkout this link
I am helping develop a web application for one of the departments in the company I work for.
I was asked to look into a way to log off every user that might be on the application at once, so that if updates to the Web App are pushed out, people aren't working with an old version of it.
My problem is that as I am not very savvy with PHP, JQuery, AJAX, etc. which is what we're using, I have not known exactly what to look for.
We have a timer script running every couple seconds in the background, so I was thinking that I could add an admin button that updated a field in the database which this script could check every so often, and if the field was set, the logoff script could be executed. But this seems like a hack to work around the issue.
The guy I'm working with suggested I look into custom SESSION handlers.
What do you guys think? Any ideas?
Any help would be appreciated. Even if it's an idea on what to start searching for.
Thanks in advance!
EDIT: I should mention that this is a one-page web app. The user is not following any links or leaving the page.
Make an entry for logged in users in your database of choice, maybe memcached if performance is a criteria.
Use a custom Session save handler which stores the sessions in database or file. When you want to destroy all sessions, you can clear the storage (be it database, or file).
Start from - http://php.net/manual/en/function.session-set-save-handler.php
What I ended up doing was the following:
I added a field into one of out database tables and checked its value every time our browser tick came through (about every minute or so). If the field is set when the tick comes through, their page is refreshed, thus logging them off the application and destroying their session (We destroy the session when someone leaves the page).
The users cannot log back in until that field has been reverted to '0'
The admin account can change that field with the click of a button. Therefore their field in the database remains as a '0'
It might be kind of a hack, but it's what I could come up with even after everyone's help. The only issue is that it takes a bit to log everyone off. Problems of pulling vs pushing I guess.
And yes, an email will be sent out some time before logging everyone off so they don't lose work.
Thank you all for your help!
I recently got Pair Networks to migrate my app to a new pair server. Since then I noticed the following:
Some users with extra permission are no longer able to access those areas they should normally have permission for. They get redirected to the login page which also serves as the Access Denied page.
Some pages with forms now redirect users to login.php on submit of the form. Form data are submitted to the db as expected though.
I have checked the db and the users are configured correctly. Also, user do not lose session when this happens, as they can click Back and navigate to a different area. I have also had a look at the log files but unable to gather much apart from the HTTP 302 code appearing a number or times to login.php probably describing the redirect to the login page.
Can anyone please suggest what could be responsible for this? Could it be a configuration problem and how can I deal with that? Could it be a conflict in those two servers I don't suppose it's pair's server, as I haven't really encountered similar problems in the past.
Any directions will be very much appreciated.
Seams like you are using PHP sessions out of the box, PHP is probably storing temp cookies on a folder that gets cleaned way to often.
If this is the case there is a security risk as the folder is server-shared and your services can be compromised.
A simple way to fix this is to change your session_save_path that can be done in the following fashion:
<?php
session_save_path('/home/example.com/sessions'); // where this a personal directory
ini_set('session.gc_probability', 1);
?>
This is a common problem about sharing data.
As i am building a system that allow user share their mailing list to their colleague.
I suspect there is a problem when userA open the page ,
userB open the same page and edit the data,
after that user A edit the data and submit and the changes of userB will be cancel.
As i am using PHP , is their any way to prevent this kind of error??? Thank you.|
Are there any coding example provided in php /jquery??? Thanks a lot
Make editions log, so user A will update conent ver. 123 to ver. 124 , user B will try too to update ver. 123 in his own way, but on server there is already ver. 124, so you will show message to user B, that content was recently modified by another user.
This principe is used in SVN for example.
There are a few solutions.
The simplest would be to have a "lock" field on a database which is set to true when someone is looking at a page, and refuses to let anyone else enter the page while it is locked. This isn't a great idea because it's difficult to capture when someone has left the page, so the page might remain locked forever.
You can get around that problem by using a little AJAX call that sends a message to the server to lock the page every ten seconds or so, and the page locking has a thirty-second time limit.
Perhaps the best method (although this depends on the system) is to use AJAX to dynamically reload components of the page when they are edited by another user (and to put a message next to them when they are being edited), and to warn both users if they are editing the same field at the same time.
i have 2 stores here : oc v1.4.9.3
1) tsubamecorp.com/singapore/
2) tsubamecorp.com/malaysia/
The problem is when you login to tsubamecorp.com/singapore/admin everything is work fine.
The url after login look something like this tsubamecorp.com/singapore/admin/index.php?route=common/home&token=827bcf36d9c167581620f377417e8774 but when you change the folder from singapore to malaysia in url tsubamecorp.com/malaysia/admin/index.php?route=common/home&token=827bcf36d9c167581620f377417e8774
you can login without put username or pass in login page for malaysia store!!!
This only happen when you try in same browser.
Any solutions??
Without changing the default behaviour of OpenCart (as explained by Zappo) you should set up a new host name for each shop instead. You'll have to register two separate DNS names and then access your shops as follows...
malaysia.tsubamecorp.com/admin/index.php
singapore.tsubamecorp.com/admin/index.php
You can still run with a single installation of OpenCart and a single database. This post may help you understand this configuration better...
http://forum.opencart.com/viewtopic.php?f=20&t=21411
I think this will only occur when you change the name and refresh. I guess when you log out and try to login again it will no work.
That's default OpenCart behaviour...
I also think Jerome is correct. The cookies are in the same domain, so OpenCart thinks you're still logged-in.
HOWEVER, I don't see your problem...
If someone is able to get that cookie set, he or she already logged in...
(e.g. This can not happen when someone did not log in)