Announcement

Collapse
No announcement yet.

4.2.3 upgrade results in PHP Warning: preg_replace_callback(): Requires argument 2, '',

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

  • 4.2.3 upgrade results in PHP Warning: preg_replace_callback(): Requires argument 2, '',

    PHP Warning: preg_replace_callback(): Requires argument 2, '', to be a valid callback in /home/dddddd/public_html/vbforum/includes/functions_newpost.php on line 203

    PHP Version 5.4.42


    Upgraded PHP and have seen some errors in logs - errors persist when I disable hooks
    file is clean

    urls are no longer parsed which is what the lines near 203 in that file appear to do


    "return preg_replace_callback(
    '#(^|\[/(' . $skiptaglist . ')\])(.*(\[(' . $skiptaglist . ')\]|$))#siU',
    function ($matches)
    {
    return convert_url_to_bbcode_callback($matches[3], $matches[1]);
    },
    $messagetext
    );"


    All suggestions welcomed
    http://www.TALONClub.com/forum
    http://www.prowltalk.com
    http://www.nloc.net
    http://www.nhtoc.com

  • #2
    also private message issues
    PHP Warning: preg_replace_callback(): Requires argument 2, '', to be a valid callback in /vbforum/includes/class_bbcode_alt.php on line 1217, referer: vbforum/private.php?do=newpm&u=48351 [Sat Jul 11 10:48:20.917964 2015] [core:notice] [pid 29
    http://www.TALONClub.com/forum
    http://www.prowltalk.com
    http://www.nloc.net
    http://www.nhtoc.com

    Comment


    • #3
      PHP warnings in the logs can safely be ignored. As long as they aren't outputting on screen then they are nothing to be concerned about.

      The URL parsing is likely a different issue...do you mean that if you paste a URL into a post, it doesn't turn into a link?
      MARK.B | vBULLETIN SUPPORT

      TalkNewsUK - My vBulletin 5.5.6 Demo
      AdminAmmo - My Cloud Demo

      Comment


      • #4
        yes urls dont turn into links and PMs dont send correctly and the errors above were generated by my IP address when testing both
        http://www.TALONClub.com/forum
        http://www.prowltalk.com
        http://www.nloc.net
        http://www.nhtoc.com

        Comment


        • #5
          I have the same issue. I tried to disable PHP warnings from outputting on the screen from here but it did not help: http://www.vbulletin.com/forum/forum...66#post4000466

          Comment


          • #6
            I dont see them on the screen - only in the logs - but the PMs only work some of the time and the links no longer render

            the site is NLOC.net
            http://www.TALONClub.com/forum
            http://www.prowltalk.com
            http://www.nloc.net
            http://www.nhtoc.com

            Comment


            • #7
              I replaced the 4.2.3 code in includes/functions_newpost.php around line 203:

              Code:
                  return preg_replace_callback(
                      '#(^|\[/(' . $skiptaglist . ')\])(.*(\[(' . $skiptaglist . ')\]|$))#siU',
                      function ($matches)
                      {
                          return convert_url_to_bbcode_callback($matches[3], $matches[1]);
                      },
                      $messagetext
                  );


              with version 4.2.2 code:

              Code:
                  return preg_replace(
                      '#(^|\[/(' . $skiptaglist . ')\])(.*(\[(' . $skiptaglist . ')\]|$))#siUe',
                      "convert_url_to_bbcode_callback('\\3', '\\1')",
                      $messagetext
                  );


              And URLs parse normally again. Bandaid fix for now.

              Comment


              • #8
                thanks for code - Ill try it

                Internet Brands and VB are getting on my last nerve. No response or support on this issue and many of the sites they have purchased are SO loaded with slow loading ads they are unusable

                Luckily the sites I own manage are sunsetting due to the vehicles they are related to being LONG out of production.
                Which means there is a future where I wont have to deal with this any more ... someday

                Examples of slow sites
                http://www.internetbrands.com/portfo...ems/clublexus/
                http://www.internetbrands.com/portfo...corvetteforum/
                even going from page to page on that IB site is slow as hell ...
                Seems a pattern
                Last edited by Silver_2000; Wed 15th Jul '15, 9:47am.
                http://www.TALONClub.com/forum
                http://www.prowltalk.com
                http://www.nloc.net
                http://www.nhtoc.com

                Comment


                • #9
                  The people at vBulletin have no control over the Internet Brands websites nor do we have anything to do with the ads they display. Try the attached file to see if it resolves the issues. You will need to rename it. This file is a hotfix from Support but hasn't gone through any sort of QA testing.
                  Attached Files
                  Translations provided by Google.

                  Wayne Luke
                  The Rabid Badger - a vBulletin Cloud demonstration site.
                  vBulletin 5 API - Full / Mobile
                  Vote for your favorite feature requests and the bugs you want to see fixed.

                  Comment


                  • TheLastSuperman
                    TheLastSuperman commented
                    Editing a comment
                    I recently had a ticket where this same exact, identical issue was in play. After uploading your file provided everything worked fine, client was very thankful and I did provide them a link to this thread - credit where it's due respectively . Thought I'd comment and let you know that it's now helped someone else and should serve as another testament that despite no Q&A it helped another site .

                • #10
                  Wayne,
                  Thanks for the help.
                  Ill try the file.

                  I wasn't implying responsibility.
                  I was implying a potential corporate culture connection...
                  IMO - In 2015. the actions of the parent company will reflect on the subsidiaries ...
                  http://www.TALONClub.com/forum
                  http://www.prowltalk.com
                  http://www.nloc.net
                  http://www.nhtoc.com

                  Comment


                  • #11
                    Originally posted by Silver_2000 View Post
                    Wayne,
                    Thanks for the help.
                    Ill try the file.

                    I wasn't implying responsibility.
                    I was implying a potential corporate culture connection...
                    IMO - In 2015. the actions of the parent company will reflect on the subsidiaries ...
                    Please let us know how you get on with that file.
                    MARK.B | vBULLETIN SUPPORT

                    TalkNewsUK - My vBulletin 5.5.6 Demo
                    AdminAmmo - My Cloud Demo

                    Comment


                    • #12
                      Seems to have helped - confirmed that PMs, links and ability to "go advanced" work for me - waiting to confirm that registered users also have same luck
                      http://www.TALONClub.com/forum
                      http://www.prowltalk.com
                      http://www.nloc.net
                      http://www.nhtoc.com

                      Comment

                      Related Topics

                      Collapse

                      Working...
                      X