Login!
Lost password?
 

MODx Bug/Feature Tracker and Feature Requests

Welcome to the MODx CMS Tracker. Please choose the appropriate project from the drop down menu and provide as much information as possible regarding your server environment and browser. Thanks!

FS#942 — DocManager template variables don't save

Attached to Project — MODx
Opened by Andy Shellam (andyccn) - Sunday, 09 September 2007, 08:32AM
Last edited by Garry Nutting (garryn) - Monday, 19 November 2007, 07:47PM
Task Type Bug Report
Category Core Distribution
Status Closed
Assigned To Garry Nutting (garryn)
Operating System All
Severity Medium
Priority Normal
Reported Version 0.9.6
Due in Version 0.9.6.2
Due Date Undecided
Percent Complete 100%

Details

I have a large number of documents to set a new template variable for. I've created the TV (drop-down type.)

All these documents are under the container ID 2.

Using DocManager to set this variable doesn't work.
I enter 2**, set the new variable value and click Submit, nothing changes - all documents still have the default TV value.

I've tried entering a document ID singly (e.g. 80) but it still doesn't get set.
This task depends upon

This task blocks these from closing
Closed by  Brunaud (coroico)
Friday, 09 May 2008, 10:40AM
Reason for closing:  Fixed
Comment by Andy Shellam (andyccn) - Sunday, 09 September 2007, 09:00AM
NOTE: Found out this was because the Site Cache wasn't cleared, despite DocManager saying "the site cache has automatically been cleared" after the update.

Comment by Andy Shellam (andyccn) - Sunday, 09 September 2007, 09:39AM
Update: it worked for document, but doesn't appear to work for containers :S

Comment by Andy Shellam (andyccn) - Sunday, 09 September 2007, 09:55AM
After further investigation, here's what I think's happening (I'm working on a patch):

- A document currently has the value "/styles2" for it's document.
- The TV default value is "/styles"
- I want to reset the TV to the default value
- I open the DocManager form, and submit it with the document ID
- DocManager is excluding the TV from an update because the submitted value matches the default ("/styles")

What needs to happen is that DocManager sees if the given value matches the default value for the TV, and deletes it from the table for this document (so effectively resetting it to the default value.)

Comment by Andy Shellam (andyccn) - Sunday, 09 September 2007, 11:36AM
Please see the attached unified diff.
  docmanager_patch.diff
Comment by Andy Shellam (andyccn) - Sunday, 09 September 2007, 11:37AM
Please also see the assets/modules/docmanager/includes/process.inc.php patched with the diff.
  process.inc.php
Comment by Garry Nutting (garryn) - Monday, 19 November 2007, 07:47PM
  • Field changed: Status (Unconfirmed → Implemented)
  • Field changed: Due in Version (Undecided → 0.9.6.2)
  • Field changed: Percent Complete (0% → 100%)
  • Field changed: Due Date (Undecided → Undecided)
  • Task assigned to Garry Nutting (garryn)
A belated thank you for the patch - this has now been implemented in SVN rev 3159.

Comment by Brunaud (coroico) - Friday, 09 May 2008, 10:40AM
Tests done with SVN3697:
I have set the TV "tags" to "styles" for all documents of the blog hierarchy of the MODx example (default value), execpt one document initialised with the TV "styles2". And then with the doc manager, propagated the reset to the value "styles" for all documents children of the "blog" hierarchy documents (2**). As awaited, the document with the TV "styles2" has been correctly re-initialized.