e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

[Bug]: Wrong setting of mainRenders in e_Render class #5268

Open Jimmi08 opened 4 weeks ago

Jimmi08 commented 4 weeks ago

What e107 version are you using?

Latest Github version (just updated)

Bug description

        private function getMainRender()
        {

            if(isset($this->mainRenders[0]))
            {
                return $this->mainRenders[0];
            }

            return array();

        }

Value on user profile with comments ON:

[mainRenders:e_render:private] => Array
        (
            [0] => Array
                (
                    [list] => 1
                    [uniqueId] => 
                    [menuArea] => 0
                    [menuCount] => 0
                    [menuTotal] => 0
                    [setStyle] => main
                    [caption] => 0 Comments
                )

            [1] => Array
                (
                    [list] => 
                    [uniqueId] => 
                    [menuArea] => 0
                    [menuCount] => 0
                    [menuTotal] => 0
                    [setStyle] => main
                    [caption] => Member Profile
                )

        )

How to reproduce

  1. Set comments on user profile ON
  2. check with the bootstrap5 theme

image

Workaround - just partial fix

      {SETSTYLE=raw}
      {PROFILE_COMMENTS}

result

image

Expected behavior

Comment tablerender shouldn't influence the main render

What browser(s) are you seeing the problem on?

Chrome / Brave

PHP Version

8.1

tgtje commented 4 weeks ago

related #5264

fizi commented 4 weeks ago

The problem with this is that if I set it this way, the caption does not appear. The caption cannot be overwritten with comments title.