Category Widget Not Working? (after vB 4.1.12 upgrade)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • canadianrodder
    New Member
    • Mar 2008
    • 20
    • 3.6.x

    [Forum] Category Widget Not Working? (after vB 4.1.12 upgrade)

    Hi everybody, I upgraded my test vB CMS/forum to 4.1.12 and now the category widget (when accessing a category) simply re-displays the page.

    I tested it here on vBulletin Home page for the categories: Advanced, Beginner, Intermediate and it does the same thing.

    Comments / Thoughts? Am I missing something?

    Compare to how it IS working on this site(not mine):


    Thanks

    Frank
  • Paul M
    Former Lead Developer
    vB.Com & vB.Org
    • Sep 2004
    • 9886

    #2
    You appear to have found an issue, its being checked.
    Baby, I was born this way

    Comment

    • Mark.B
      vBulletin Support
      • Feb 2004
      • 24286
      • 6.0.X

      #3
      Seems ok in 4.1.11 (on my site anyhow) so this must be a 4.1.12 thing.
      MARK.B
      vBulletin Support
      ------------
      My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
      My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

      Comment

      • Maurd
        Senior Member
        • Jun 2011
        • 672
        • 4.1.x

        #4
        Science!

        How odd. I can reproduce it here, but it seems to be working fine on my test site (running 4.1.12).

        I should note I'm using standard URLs, nothing friendly. Maybe it's related.

        Edit: yup, when I switch from Standard URLs to Advanced Friendly URLs, I can reproduce it.
        Last edited by Maurd; Wed 11 Apr '12, 3:30pm. Reason: SCIENCE
        - Maurice Workin' in the Jira mine, goin' down, down, down

        Comment

        • canadianrodder
          New Member
          • Mar 2008
          • 20
          • 3.6.x

          #5
          Thanks Paul........Frank

          Comment

          • Paul M
            Former Lead Developer
            vB.Com & vB.Org
            • Sep 2004
            • 9886

            #6
            It is indeed related to the type of friendly url you use.

            See http://tracker.vbulletin.com/browse/VBIV-14667

            It requires a file edit to fix it;

            In class_friendly_url.php

            Swap this;
            Code:
            switch (basename(SCRIPT)) {
            	case 'widget.php':
            		$this->script = 'widget.php';
            		$this->rewrite_segment = 'widget';
            		break;
            	default:
            		$this->script = 'content.php';
            		$this->rewrite_segment = 'content';
            		break;
            }
            For this;
            Code:
            list($this->rewrite_segment) = explode('.',$this->script);
            (its right at the end of the file).
            Baby, I was born this way

            Comment

            • canadianrodder
              New Member
              • Mar 2008
              • 20
              • 3.6.x

              #7
              Paul, I changed this

              Code:
              {        $this->idvar = $this->ignorelist[] = $registry->options['route_requestvar'];
                      $this->script = basename(SCRIPT);
              
              
                      [COLOR=#ff0000]switch (basename(SCRIPT)) {
                          case 'widget.php':
                              $this->script = 'widget.php';
                              $this->rewrite_segment = 'widget';
                              break;
                          default:
                              $this->script = 'content.php';
                              $this->rewrite_segment = 'content';
                              break;[/COLOR]
                      }
              To

              Code:
              {        $this->idvar = $this->ignorelist[] = $registry->options['route_requestvar'];
                      $this->script = basename(SCRIPT);
              
              
                      [COLOR=#ff0000]list($this->rewrite_segment) = explode('.',$this->script);[/COLOR]
                      }
              as instructed. And, got this:

              Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /home/xxxxx/public_html/testvb/includes/class_friendly_url.php on line 1989

              Frank

              Comment

              • Maurd
                Senior Member
                • Jun 2011
                • 672
                • 4.1.x

                #8
                Looks like you left an extra closing bracket. (highlighted in blue)

                Code:
                {        $this->idvar = $this->ignorelist[] = $registry->options['route_requestvar'];
                        $this->script = basename(SCRIPT);
                
                
                [COLOR=#FF0000]        switch (basename(SCRIPT)) [COLOR=#0000FF][B]{[/B][/COLOR]
                            case 'widget.php':
                                $this->script = 'widget.php';
                                $this->rewrite_segment = 'widget';
                                break;
                            default:
                                $this->script = 'content.php';
                                $this->rewrite_segment = 'content';
                                break;[/COLOR]
                        [COLOR=#0000FF][B]}[/B][/COLOR]
                Code:
                {        $this->idvar = $this->ignorelist[] = $registry->options['route_requestvar'];
                        $this->script = basename(SCRIPT);
                
                
                        [COLOR=#FF0000]list($this->rewrite_segment) = explode('.',$this->script);[/COLOR]
                        [COLOR=#0000FF][B]}[/B][/COLOR]
                - Maurice Workin' in the Jira mine, goin' down, down, down

                Comment

                • canadianrodder
                  New Member
                  • Mar 2008
                  • 20
                  • 3.6.x

                  #9
                  Oops. Thanks Maurd.

                  Paul, that's done it. Tested with standard, basic friendly and advanced friendly URLs.

                  Frank

                  From this:

                  Code:
                  {        $this->idvar = $this->ignorelist[] = $registry->options['route_requestvar'];
                          $this->script = basename(SCRIPT);
                  
                  
                          switch (basename(SCRIPT)) {
                              case 'widget.php':
                                  $this->script = 'widget.php';
                                  $this->rewrite_segment = 'widget';
                                  break;
                              default:
                                  $this->script = 'content.php';
                                  $this->rewrite_segment = 'content';
                                  break;
                          }
                  
                  
                          parent::__construct($registry, $linkinfo, $pageinfo, $idkey, $titlekey, $urloptions);
                      }
                  To This:

                  Code:
                  {        $this->idvar = $this->ignorelist[] = $registry->options['route_requestvar'];
                          $this->script = basename(SCRIPT);
                  
                  
                          list($this->rewrite_segment) = explode('.',$this->script);
                          
                  
                  
                          parent::__construct($registry, $linkinfo, $pageinfo, $idkey, $titlekey, $urloptions);
                      }

                  Comment

                  • durruti
                    Senior Member
                    • Jan 2012
                    • 489
                    • 4.1.x

                    #10
                    Whenever I attach a category to an article, the article will move itself to homepage section from its original position in a subsection.
                    No matter what section/subsection I put the category in, the article always moves back to homepage section automatically once a category is attached to the article.

                    Help...

                    Comment

                    • Mark.B
                      vBulletin Support
                      • Feb 2004
                      • 24286
                      • 6.0.X

                      #11
                      Originally posted by durruti
                      Whenever I attach a category to an article, the article will move itself to homepage section from its original position in a subsection.
                      No matter what section/subsection I put the category in, the article always moves back to homepage section automatically once a category is attached to the article.

                      Help...
                      Best to start a new thread with full details.
                      MARK.B
                      vBulletin Support
                      ------------
                      My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
                      My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

                      Comment

                      • durruti
                        Senior Member
                        • Jan 2012
                        • 489
                        • 4.1.x

                        #12
                        Originally posted by Mark.B
                        Best to start a new thread with full details.
                        I did sent the full details via ticket support.
                        My luck is extremely bad when it comes to seeking help via thread.
                        Basically, after applying the fix for the category widget, now the section widget is problematic.

                        Comment

                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                        Working...