Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-13-2014, 02:02 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Warning Messages in Advanced Search vB 422

Using vB 4.2.2 in PHP 5.4.30

I recently upgraded to vB 422 and started getting these messages above the Advanced Search page (search.php)
Warning: Declaration of vBForum_Item_SocialGroupMessage::getLoadQuery() should be compatible with vB_Model::getLoadQuery($required_query = '', $force_rebuild = false) in ..../packages/vbforum/item/socialgroupmessage.php on line 261

Warning: Declaration of vBForum_Item_SocialGroupDiscussion::getLoadQuery() should be compatible with vB_Model::getLoadQuery($required_query = '', $force_rebuild = false) in ..../packages/vbforum/item/socialgroupdiscussion.php on line 337
There's an old thread on this from a year ago https://vborg.vbsupport.ru/showthrea...hlight=warning but I thought I would discuss a better fix than tinkering with error reporting

There are three files with the method getLoadQuery()
vb/model.php, line 481

packages/vbforum/item/socialgroupdiscussion.php line 129

packages/vbforum/item/socialgroupmessage.php line 113
In the last two files I changed the first line to read

Code:
protected function getLoadQuery($required_query = '', $force_rebuild = false)

This makes the line in the last two files identical to the first. That got rid of the warning messages but I don't use socal group messages or discussions so I don't know if these changes are messing anything up.

So, two questions:
Is anyone else getting these warnings?

Does my fix mess anything up ?
Reply With Quote
  #2  
Old 08-13-2014, 02:10 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are many posts on this and many fixes have been also posted there are other files that need to be edited for 4.2.2

packages\vbforum\item
socialgroupmessage.php
socialgroupdiscussion.php

includes
class_core.php

clientscript\yui\uploader\assets
uploader
https://vborg.vbsupport.ru/showthread.php?t=307008
If you want send me the first 3 files above and I can edit them for you
Reply With Quote
  #3  
Old 08-13-2014, 05:27 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would prefer editing instructions so I can record what I've done. Are my edits to the first two files the same as yours?
Reply With Quote
  #4  
Old 08-13-2014, 05:30 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
protected function getLoadQuery($required_query = self::QUERY_BASIC, $force_rebuild = false)
Needs to be this code for both files

For class_core.php starting at line 5688 stopping at line 5692

Code:
case E_NOTICE:
        case E_STRICT:
        case E_DEPRECATED:
            // Just ignore these completely //
        break;
You might also need to add the date to the bottom of your php.ini file something like this
Code:
[date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "America/Chicago"

; http://php.net/date.default-latitude
date.default_latitude = 31.7667

; http://php.net/date.default-longitude
date.default_longitude = 35.2333

; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333

; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333
You will find the correct info in your admincp/Maintenance/View PHP Info
Attached Images
File Type: png date.png (10.4 KB, 0 views)
Reply With Quote
  #5  
Old 08-13-2014, 08:33 PM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.
Reply With Quote
  #6  
Old 02-14-2015, 10:14 AM
stog stog is offline
 
Join Date: Dec 2013
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

confused are you saying we need to change line 1

from
Code:
<?php if (!defined('VB_ENTRY')) die('Access denied.');
to
Code:
protected function getLoadQuery($required_query = self::QUERY_BASIC, $force_rebuild = false)
in the 2 item files

-----

ok found answer in another thread
Quote:
1. - Edit the files "socialgroupmessage.php" and "socialgroupdiscussion.php" found in "packages/vbforum/item/"

2. - The original function reads:

protected function getLoadQuery($required_query, $force_rebuild = false)

3. - Change the function to this:

protected function getLoadQuery($required_query = self::QUERY_BASIC, $force_rebuild = false)
i have also replaced lines 5688 through to 5692 inclusive of the class_core.php file with the code
Code:
case E_NOTICE:
        case E_STRICT:
        case E_DEPRECATED:
            // Just ignore these completely //
        break;
this replaced
Code:
		case E_NOTICE:
			// Just ignore these completely //
		break;

		case E_WARNING:
Reply With Quote
  #7  
Old 02-14-2015, 10:18 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't do the above, just do this.

Open your includes/config.php file and below <?php add the following.

PHP Code:
define('SKIP_DS_ERRORS'true); 
So it looks like this:
PHP Code:
<?php
define
('SKIP_DS_ERRORS'true);  
/*=================================================  =====================*\
|| ##################################################  ################## ||
|| # vBulletin 4.2.2
Use a editor like notepad++ to edit any files, don't use Notepad or Wordpad.
--------------------------
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:20 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05032 seconds
  • Memory Usage 2,246KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete