In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Advanced Details Jump to Notes ] Wiki ] View Simple ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0000687 [In-Portal CMS] Front End bug report always 2010-04-09 00:02 2011-03-30 09:53
Reporter Dmitry View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Platform
Status closed   OS
  OS Version
ETA none Fixed in Version 5.1.2-B1 Product Version 5.0.3-B2
  Target Version 5.1.2 Product Build
Time EstimateNo estimate
Summary 0000687: All Sub-menu Items appear as "current" when expanded Site Menu is printed
Description All sub-menu items appear as current, when you are printing expanded site
menu version.
   - menu1
      - menu11
      - menu12
      - menu13
   - menu2
      - menu21
      - menu22
      - menu23

For example when you want print menu mentioned above and highlight current
page in it, then you should compare this using given tag:
*<inp2:m_if check="m_Get" name="m_cat_id"
equals_to="$cat_id">highlighted</inp2:m_if>* .

Mentioned above tag will always display "highlighted" because of "m_cat_id"
request variable, which is compare here is always overwritten from
*<inp2:st_CachedMenu
.../>* tag. It was done long ago to automatically pass category into menu
item links and for this tag to work: *<inp2:m_Link template="$template"/>*.

Proper way to build links to menu items is by directly passing category id
to them like this *<inp2:m_Link template="$template" m_cat_id="$cat_id"/>*.

As a fix I propose to remove code, that sets m_cat_id from st_CachedMenu tag
and patch all our themes (if needed). For users who have customized their
themes or created new onces I propose to write note about required change in
theme templates in "ChangeLogMessage" field in task, that would be created
based on this discussion.
Steps To Reproduce
Additional Information Changes to be made in customized themes:

BEFORE:
<a href="<inp2:m_Link template='$template'/>"><inp2:m_Param name="title"/></a>
<inp2:st_CachedMenu render_as="sub_menu_element"/>

AFTER:
<a href="<inp2:m_Link template='$template' m_cat_id='$cat_id' use_section='$use_section' m_cat_page='1'/>"><inp2:m_Param name="title"/></a>
<inp2:st_CachedMenu render_as="sub_menu_element" category_id="$cat_id"/>
Tags No tags attached.
Reference http://groups.google.com/group/in-portal-bugs/browse_thread/thread/4430646c6a7c4947
Change Log Message Fixes issue with highlighting active sub-menu
Estimate Points 0
Attached Files patch file icon sub_menu_highlight_fix.patch [^] (788 bytes) 2011-01-05 02:46 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
User avatar (0003129)
alex (manager)
2011-01-05 02:50
edited on: 2011-01-05 03:17

Here is test code, that I've placed in "footer.elm.tpl" of "advanced" theme:

----------------------
(edit note to get correct HTML!!!)
----------------------

FOOTER MENU:
<div>
    <inp2:m_DefineElement name="top_menu_element">
        

  •             <inp2:m_if check="m_Param" name="active">
                    ACTIVE:
                </inp2:m_if>
                <a href="<inp2:m_Link template='$template' m_cat_id='$cat_id' use_section='$use_section'/>">
                    <inp2:m_Param name="title"/>
                </a>

                <inp2:m_if check="m_Param" name="has_sub_menu">
                    <ul style="overflow: visible; border: 1px solid green;">
                        <inp2:st_CachedMenu render_as="sub_menu_element" category_id="$cat_id"/>
                    
                </inp2:m_if>
            

  •     </inp2:m_DefineElement>

        <inp2:m_DefineElement name="sub_menu_element">
            

  •             <inp2:m_if check="m_Param" name="active">
                    SUB ACTIVE:
                </inp2:m_if>
                <a href="<inp2:m_Link template='$template' m_cat_id='$cat_id' use_section='$use_section'/>">
                    <inp2:m_Param name="title"/>
                </a>
            

  •     </inp2:m_DefineElement>

        <ul style="overflow: visible; border: 1px solid red;">
            <inp2:st_CachedMenu render_as="top_menu_element" category_id="1"/>
        
    </div>


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

    You need to have some 2nd level sections to be created to test, e.g. "Directory -> Sub Directory 1". Code above don't show "SUB ACTIVE" (even if 2nd level sub section is selected) until patch is applied.

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

    All themes were using correct tags, so no changes required there.

    User avatar (0003169)
    Dmitry (manager)
    2011-01-05 13:22

    Reviewed and tested okay, please commit.
    User avatar (0003170)
    Dmitry (manager)
    2011-01-05 13:27

    Reminder sent to: erik, gleb, nikita

    Erik, Gleb, Nikita,

    Please take a close look to this task since it will be affecting your TPL/HTMLs in the future.

    If any questions, please feel free to ask in Google Groups. Link to discussion can be found in Reference field of this task.
    User avatar (0003175)
    alex (manager)
    2011-01-09 08:24

    Fix committed to 5.1.x branch. Commit Message:

    Fixes 0000687: All Sub-menu Items appear as "current" when expanded Site Menu is printed
    User avatar (0003355)
    Dmitry (manager)
    2011-03-30 09:53

    Closing, since 5.1.2 release has been released.

    - Related Changesets
    In-Portal CMS: 5.1.x r14125
    Timestamp: 2011-01-09 08:24:45
    Author: alex
    Details ] Diff ]
    Fixes 0000687: All Sub-menu Items appear as "current" when expanded Site Menu is printed
    mod - /in-portal/branches/5.1.x/core/units/helpers/menu_helper.php Diff ] File ]

    - Issue History
    Date Modified Username Field Change
    2011-03-30 09:53 Dmitry Note Added: 0003355
    2011-03-30 09:53 Dmitry Status resolved => closed
    2011-01-09 08:24 alex Changeset attached 5.1.x r14125
    2011-01-09 08:24 alex Note Added: 0003175
    2011-01-09 08:24 alex Status reviewed and tested => resolved
    2011-01-09 08:24 alex Fixed in Version => 5.1.2-B1
    2011-01-09 08:24 alex Resolution open => fixed
    2011-01-09 08:24 alex Assigned To !COMMUNITY => alex
    2011-01-05 13:27 Dmitry Issue Monitored: erik
    2011-01-05 13:27 Dmitry Issue Monitored: gleb
    2011-01-05 13:27 Dmitry Issue Monitored: nikita
    2011-01-05 13:27 Dmitry Note Added: 0003170
    2011-01-05 13:25 Dmitry Change Log Message => Fixes issue with highlighting active sub-menu
    2011-01-05 13:22 Dmitry Note Added: 0003169
    2011-01-05 13:22 Dmitry Status needs testing => reviewed and tested
    2011-01-05 03:17 alex Note Edited: 0003129 View Revisions
    2011-01-05 02:50 alex Note Edited: 0003129 View Revisions
    2011-01-05 02:50 alex Note Added: 0003129
    2011-01-05 02:50 alex Assigned To => !COMMUNITY
    2011-01-05 02:50 alex Developer => alex
    2011-01-05 02:50 alex Status active => needs testing
    2011-01-05 02:46 alex File Added: sub_menu_highlight_fix.patch
    2011-01-05 02:41 alex Additional Information Updated View Revisions
    2010-12-06 12:48 alex Target Version Icebox => 5.1.2
    2010-05-10 14:50 alex Target Version 5.0.4 => Icebox
    2010-04-09 00:02 Dmitry New Issue
    2010-04-09 00:02 Dmitry Reference => http://groups.google.com/group/in-portal-bugs/browse_thread/thread/4430646c6a7c4947



    Web Development by Intechnic
    In-Portal Open Source CMS
    In-Portal Open Source CMS
    Copyright © 2000 - 2009 MantisBT Group

    Powered by Mantis Bugtracker