Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1325

Perform intellectual cache update on category changes

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Needs Changes
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 5.2.2
    • Component/s: CMS
    • Labels:
      None
    • Change Log Group:
      Fixed
    • Change Log Message:
      Fixes case, where "+" icons next to categories, created from theme, were missing.
    • Story Points:
      3
    • Sprint:
      In-Portal's First Sprint, In-Portal's 2nd Sprint, In-Portal's 3rd Sprint, In-Portal's 4th Sprint
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      Hierarchy related category fields, that needs to be updated on category add/move/delete:

      • ParentPath
      • NamedParentPath
      • NamedParentPathHash
      • CachedTemplate
      • CachedTemplateHash
      • CachedDescendantCatsQty
      • TreeLeft
      • TreeRight

      Plan:

      1. fix the StrictPath feature of kPermCacheUpdater class to correctly update TreeLeft/TreeRight fields of added/moved categories and their parent/sub-categories
      2. fix the StrictPath feature of kPermCacheUpdater class to correctly propagate changes to all parent categories in StrictPath (right now only direct parent is updated)
      3. ensure, that following happens:
        • when adding category in live table perform StrictPath update on that category ParentPath
        • when deleting category in live table perform StrictPath update on that category's parent category ParentPath
        • when moving category in live table perform StrictPath update on old parent category ParentPath and on new ParentPath of moved category
        • when in any of above happens in temp table wait till changes are saved in live table (the "c:OnSave" event) and perform equivalent StrictPath updates
      4. update above mentioned fields, when category is added/moved/deleted using StrictPath feature of kPermCacheUpdater
      5. ensure, that all category-powered caches (e.g. front-end menu, the category structure dropdown) are reset when category hierarchy affecting action is performed
      6. when moving category with sub-categories then force popup/modal window for category permission cache rebuild

      Problems solved while this task was developed:

      1. when "Section Permission Rebuild Mode" setting in "Configuration > Website > Output" section was set to "Manual" these things were broken:
        • the "Categories.CachedDescendantCatsQty" column was updated only for direct parent category of target category under which new category was created or pasted (affected "+/-" icon showing in Admin Tree next before category name)
        • when creating new category TreeLeft/TreeRight columns of it and all it's parent categories were calculated incorrectly (affects category listings, that rely on TreeLeft/TreeRight values to be correct)
        • when moving categories all hierarchy related fields (see list above) still had values based on category from where this category was moved away and not its new parent category
        • when deleting categories the "CachedDescendantCatsQty" field of all parent categories of deleted category wasn't updated (resulted in "+" icon was shown for categories, that had no sub-categories)
        • when a category was moved using "Cut" and "Paste" toolbar buttons in Catalog none of Hierarchy related category fields was updated
        • when adding new category it's TreeLeft/TreeRight columns were having 0 as value (made category invisible in Catalog until full category cache rebuild happens)
      2. when category, visible in menu was moved (via "Cut" and "Paste" toolbar buttons in Catalog)/deleted it was still shown in it's old location on the Front-End or "Parent Section" field dropdown in Admin Console)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
                Reviewer:
                Erik Snarski [Intechnic]
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0h
                  0h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 12.5h
                  12.5h