Page 1 of 2

free a locked template

Posted: Mon Sep 07, 2015 4:59 am
by rotezecke
i managed to lock myself out from editing templates (using browser back button). i since found the settings to disabled the lock, but still; now that the lock is both disabled AND expired, the only thing offered to me is to "steal the lock" (with a warning that some other user is editing and all changes may get lost). once stolen, this is up top:
"Another user is editing this item. You will not be able to save any of your work until lock time out expires."
i can submit, cancel and apply the stolen lock (and changes (if any) actually stick!), but in design manager overview the thing is still marked as locked (though stealable). is this the intended behaviour?

----------------------------------------------

Cms Version: 2.0

Installed Modules:

CMSMailer: 5.2.4
FileManager: 1.5
MenuManager: 1.50
ModuleManager: 2.0
News: 2.50
CGSmartImage: 1.20.2
Search: 1.50
TinyMCE: 2.9.12
CGSimpleSmarty: 2.0
CGExtensions: 1.49.7
CGBlog: 1.13.1
CGFeedback: 1.7.2
Captcha: 0.5.2
FormBuilder: 0.8.1.1
AdminSearch: 1.0
MicroTiny: 2.0
JQueryTools: 1.3.6
CMSContentManager: 1.0
DesignManager: 1.0
Navigator: 1.0


Config Information:

php_memory_limit:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Australia/Sydney
permissive_smarty: false


Php Information:

phpversion: 5.4.44-1~dotdeb+7.1
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference:
test_db_timedifference:
memory_limit: 128M
max_execution_time: 30
output_buffering: 4096
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /var/lib/php5 (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 0
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: On (True)

Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 5.6.19
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No file system time difference found


----------------------------------------------

Re: free a locked template

Posted: Mon Sep 07, 2015 1:59 pm
by calguy1000
I spent ~20 minutes playing with the locking in templates last night to confirm that at least here it works as it should.

If you have the design manager open in multiple browser tabs then that may be the confusion your experiencing. The template list does not refresh automatically via ajax. So therefore if you have multiple browser tabs open editing templates, one tab may say that a template is locked even though you may have cancelled or submitted that template from the other tab. Reloading the page in the second tab should refresh the issue.

In template editing if you click on the browser back button, and nothing has been changed in the form then it is the same as pressing the cancel button. If something has changed, an alert box will appear asking you if you want to navigate away from the page.

Re: free a locked template

Posted: Tue Sep 08, 2015 1:26 am
by rotezecke
thanks. after another 20 minutes of fiddling i ended up clearing the table via phpmyadmin.

Re: free a locked template

Posted: Wed Sep 09, 2015 12:02 am
by mr.bacan
rotezecke wrote:thanks. after another 20 minutes of fiddling i ended up clearing the table via phpmyadmin.
I had to do the same thing, because even after the lock time ended, I couldn't access the content.

Re: free a locked template

Posted: Thu Sep 10, 2015 5:11 pm
by geotek
same thing here. Even after setting lock timeout to zero I am getting punished by a 59 minute edit ban while editing a template.

Please provide a way to completely turn off this "feature" :-(

Re: free a locked template

Posted: Thu Sep 10, 2015 6:48 pm
by Rolf
You can set the time value to 0 to disable the locking of pages and templates

Re: free a locked template

Posted: Thu Sep 10, 2015 9:57 pm
by rotezecke
@Rolf
yesterday i got locked out, despite the setting being on 0. I still have not managed to reliably reproduce this behaviour though. will post again if i do.

Re: free a locked template

Posted: Thu Sep 10, 2015 10:39 pm
by calguy1000
Setting the lock timeout to 0 will disable locking for future editing sessions, but will not clear existing locks.

Re: free a locked template

Posted: Fri Sep 11, 2015 5:36 am
by mr.bacan
calguy1000 wrote:Setting the lock timeout to 0 will disable locking for future editing sessions, but will not clear existing locks.
That actually worked for me after clearing the database and cache.

Re: free a locked template

Posted: Fri Sep 11, 2015 6:36 pm
by Sponsi
OK so how do you unlock this?
Without editing the db, waiting for (hopefully) unlocking after the time has passed?
Where is the "clear locks" or "clear the lock" or whatever button, just like in Joomla... because there IS such option, right?

EDIT: OK, so the unlock "key" shows after some time... OMFG... can't you make it an administrator's option?

Re: free a locked template

Posted: Fri Sep 25, 2015 8:34 am
by tristan
Second that, we definitely need an easy way to overrule the lock. Just a simple warning when you try to open something locked would work best probably.

Re: free a locked template

Posted: Fri Oct 02, 2015 3:46 pm
by KayakMan
Third that... just dabbling with 2.0 (looks great btw!!) but this lock craic is recking my head :-)

Just confirming what happened. I opened a template and submitted it and it locked.

42min to go.... ::)

In theory, for larger teams, these locks are a great addition. But in practice you are going to have a lot of people head scratching. Be prepared for lots of posts about this ;D

So as a 'superadmin', who is creating a new site, who usually has multiple tabs & browser windows open. Every time I use 2.0, I'm going to have to go in and set all content locks to 0. So I'm not locking myself out of what I'm working on. Is this correct?

One global 'remove all lock' button would be great. I must go an read up on how these work & what's the theory behind them.

- - - - -
edit - Very confused by locks.

1. Template locked.
2. Waited for it to time out.
3. Set lock timeout to zero.
4. Stole the lock.
5. Edited content of template.
6. Opened Design Manager in new tab to edit a different template (menu), notice the template I'm editing in the first tab is locked??
7. Went back to first tab submitted the page.
8. Template just submitted is now locked, but I can steal it (again).
9. Stole it, opened template and changes I made are present.

Re: free a locked template

Posted: Fri Oct 02, 2015 5:01 pm
by calguy1000
As previously stated:

You can disable the locking by setting the lock timeouts to 0 in the settings. This applies to future locks, not current locks.

For current locks, just wait the hour till they are 'stealable' and then steal the lock, and cancel the edit. You should not have further problems.

Also, a great deal of work and testing has been done wrt the locking in 2.0.1 which is due out this weekend.

Re: free a locked template

Posted: Mon Oct 05, 2015 4:16 pm
by KayakMan
Thanks Calguy & apologies.

From my very limited testing here .... there might be a bit of stickiness with pages and templates created before locks are set to zero (I always have to steal them). Any pages and templates created after locks are set to zero behave as you describe.

My understanding of a lock is possibly the issue ::)

Re: free a locked template

Posted: Wed Dec 16, 2015 10:11 am
by Sponsi
Locking in 2.1 still sucks : /
You haven't thought this feature over, have you?