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

Create categories during theme scan based on their location in SMS

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.2-B3
    • Component/s: CMS
    • Labels:
      None
    • Change Log Group:
      Fixed
    • Change Log Message:
      During theme scan categories weren't created according to their SMS location resulting in duplicate categories being created.
    • Story Points:
      1
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      Plan:

      1. change the "c:OnAfterRebuildThemes" event to unserialize values of "$files" array (all at once) before using them later - 0.3h
      2. create the "CategoriesEventHandler::sortByDependencies(array $files)" method, that will: - 0.5h
        1. accept $files associative array, that is built in "c:OnAfterRebuildThemes" event, where:
            1. key is relative path to a template in theme
            2. value is array, that was parsed from template meta comment
        2. for each array entry (the template file) build a sorting key like this:
            1. take array from "section" key of template info (if missing use empty array)
            2. append value of "name" key to that array (if missing use '_Auto: ' . $template)
            3. combine using a separator (e.g. "||")
        3. sort array using sort key built above (will ensure, that parent templates will be listed prior to child templates)
        4. return sorted "$files" array
      3. in the "c:OnAfterRebuildThemes" event call the "CategoriesEventHandler::sortByDependencies" method on the "$files" array prior to creating categories from it - 0.2h

        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:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4.65h
                  4.65h