Announcement

Collapse
No announcement yet.

Cannot create new channel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot create new channel

    Hi, when I try to create a child-channel under the forum channel in the AdminCP I get this error:

    Code:
    An unexpected error was returned: 'Call to a member function resetForcedStyles() on null'
    
    Exception trace:
    
    ## phar:///chroot/home/html/forum/core/vb/vb.phar/library/content/channel.php(219) Exception Thrown
    #0 phar:///chroot/home/html/forum/core/vb/vb.phar/api/content.php(115): vB_Library_Content_Channel->add(Array, Array)
    #1 phar:///chroot/home/html/forum/core/vb/vb.phar/api/content/channel.php(94): vB_Api_Content->add(Array, Array)
    #2 phar:///chroot/home/html/forum/core/vb/vb.phar/api/wrapper.php(201): vB_Api_Content_Channel->add(Array)
    #3 /chroot/home/html/forum/core/admincp/forum.php(319): vB_Api_Wrapper->__call('add', Array)
    #4 /chroot/home/html/forum/includes/api/interface/collapsed.php(147): require_once('/chroot/home/br...')
    #5 /chroot/home/html/forum/includes/vb5/frontend/controller/relay.php(33): Api_Interface_Collapsed->relay('admincp/forum.p...')
    #6 /chroot/home/html/forum/index.php(74): vB5_Frontend_Controller_Relay->admincp('forum.php')
    #7 {main}
    what can be wrong?
    What's brewing in Poland? Find out on www.Browar.biz (in Polish)
    PL: Modyfikacje vB: www.pub.net.pl

  • #2
    Hmmm... This is used when writing out "CSS as Files" and you have assigned a style to the channel. That specific call is for tests and it resets the cache for that purpose. Its entire purpose is to set a value to Null.

    When you create the channel, what do you set its options to?
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      The channel gets created in the end in terms of showing up in the forums tree.

      My options besides the defaults were
      Create Channel Based off of Channel: -Forum
      Custom Style for this Channel ----> a newly created style
      Override Users' Style Choice (If this channel uses a custom style, this will force users with a different style choice to see the channel with the style you specified)---- YES
      Act as Channel (Will act as category if no) ---- NO
      What's brewing in Poland? Find out on www.Browar.biz (in Polish)
      PL: Modyfikacje vB: www.pub.net.pl

      Comment


      • #4
        Does the forum channel appear properly on the front-end?

        What happens if you cycle "Save CSS and SVG as files" off then back on (saving between changes)?
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment


        • #5
          No bug fix yet?

          Comment


          • #6
            Originally posted by Bob Ricci View Post
            No bug fix yet?
            There was never any additional feedback from the original poster. I don't know if it resolved his issue or not.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment


            • #7
              No, it's not resolved. I'm having trouble setting up forums when I specify a fixed red/black style. I thought that there was a global setting... I'm trying to set it forum by forum which triggers the error.

              Comment


              • #8
                So you're one the same site as the original customer? If not, please open your own topic and provide the answers to the requested information in the topic here: https://forum.vbulletin.com/forum/vb...esting-support

                You can set a default style globally in the AdminCP under Settings → Options → Style & Language Options.

                I can't figure out how to recreate the error in the latest version.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API

                Comment


                • #9
                  Well that's real simple. Since I have an unmodified new installation that should answer 99% of the questions you ask and it only occurs with and unmodified red/black style as I originally indicated. But I'll go ahead and edit the files and give you the debug even though it's likely going to be the same as previously reported and can be found by searching Google but was never corrected in a subsequent release.

                  Comment


                  • #10
                    I've attempted to recreate this issue on a default install using the Red/Black style with vBulletin 5.6.4 PL1 and PHP 7.4.18 along with MySQL 8.0.X. I did not receive any database errors.
                    Translations provided by Google.

                    Wayne Luke
                    The Rabid Badger - a vBulletin Cloud demonstration site.
                    vBulletin 5 API

                    Comment


                    • #11
                      I have installed PHP version 8. Of course I've made a back up of the vbulletin MariaDB database. Can I switch to version 8 or do I need to completely reinstall vBulletin? I'm currently running php v7.3.x and mysql 5.5.68-MariaDB.

                      According to your sticky message pehp version 8 is not supported in this version of the bulletin.
                      Thanks.

                      With the impending release of PHP 8, I want to point out that the current version of vBulletin 5.6.4 does not support this major release at this time.
                      Was this updated with the release of PL1?
                      Last edited by Bob Ricci; Mon 19 Jul '21, 5:24pm.

                      Comment


                      • #12
                        No... Patch Levels do not introduce new code like PHP Compatibility. It would take a 5.6.5 or 5.7.0 release. You cannot use PHP 8.
                        Translations provided by Google.

                        Wayne Luke
                        The Rabid Badger - a vBulletin Cloud demonstration site.
                        vBulletin 5 API

                        Comment


                        • #13
                          Originally posted by Wayne Luke View Post
                          I've attempted to recreate this issue on a default install using the Red/Black style with vBulletin 5.6.4 PL1 and PHP 7.4.18 along with MySQL 8.0.X. I did not receive any database errors.
                          I know that you are very intelligent and know vB. I used to know it very, very well. Not anymore. But I do know PHP.

                          I use PHP 7.3.29 and MySQL 8.0.1. The errors shown by the OP of this thread appear to be PHP errors, not MySQL. My suspicion as a once professional programmer.

                          To the point, I went in with VI to edit the Presentation config.php and found that each line terminates in a
                          Code:
                           ^M
                          . That means that it was edited with a Windows editor. I didn't touch the file but if I had it would have been with PHPedit or CS 5.5. But /core/includes/config.php does not show the carriage return. Of course I can fix it but I thought that I'd bring it to your attention.

                          Is there part of the setup/install process that generates config.php? If so it's dropping in a CR.

                          Code:
                          $config['report_all_php_errors'] = false;^M
                          $config['no_template_notices'] = true;^M
                          ^M
                          // This setting should never be used on a live site^M
                          $config['no_js_bundles'] = false;^M
                          ^M
                          // This setting enables debug mode, it should NEVER be used on a live site^M
                          $config['debug'] = false;^M
                          ^M
                          // Assumes default location of core. ^M
                          // These are the system paths and folders for your vBulletin files^M
                          // This setting is for where your vbulletin core folder is^M
                          $config['core_path'] = realpath(dirname(__FILE__)) . '/core';^M
                          ^M
                          $config['php_sessions'] = false;^M
                          ^M
                          /core/includes/config.php has no CR's.
                          Last edited by Bob Ricci; Mon 26 Jul '21, 3:51am.

                          Comment


                          • #14
                            We ship the software with Linux new line characters. This is a primary reason why the files couldn't be opened in older versions of Windows Notepad. If you opened the files in a Windows text editor that was configured to force Windows carriage returns into the files that could be the cause.

                            There is a utility that runs on install (only) that will write these files if they do not exist on the server. However, these should use the native new line for the OS. Most people use Linux servers. If this utility was used and you were utilizing a Windows IIS server, then they could be inserted. Even then, they shouldn't cause problems on most modern servers. If they did, your site wouldn't even run. It would present a white screen and log a fatal parse error from PHP.
                            Translations provided by Google.

                            Wayne Luke
                            The Rabid Badger - a vBulletin Cloud demonstration site.
                            vBulletin 5 API

                            Comment


                            • #15
                              Fair enough but I was not aware of that CentOS requires a ^M in text files. VI has never shown one until now and only in this one file. This is actually one reason someone should not use notepad because it does add additional information to the end of the line that people generally don't see. I viewed only config.php with VIM but only the presentation configuration file. I did not save the file. ^M does not appear when looking in the/ core/includes config.php. if I # cat config.php it appears correctly. As I said, I can fix it.

                              I use PHPedit in Windows that shows files properly indented with proper syntax and incorrectly typed commands and all that good stuff. I've also been using Dreamweaver under its various names now since late 1997. Once Adobe bought it suddenly it's a monthly subscription.

                              Thanks for getting back to me.

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X