vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Error message after using advanced editor (https://vborg.vbsupport.ru/showthread.php?t=316903)

MistViper 01-24-2015 10:10 PM

Error message after using advanced editor
 
1 Attachment(s)
Hey guys, I'm curious as to how to fix this error I've been getting. I noticed that after I went to advanced editor, to test a new BB code I added to strikethrough words or phrases, it had this error. I know it wasn't caused by the BB code I added, because I removed it and I still received the error. Any ideas on how to find out the problem?

ozzy47 01-24-2015 10:12 PM

Disable plugins via the includes/config.php file.

To do that open your includes/config.php file and below <?php add the following.

PHP Code:

define('DISABLE_HOOKS'true); 

So it looks like this:
PHP Code:

<?php
define
('DISABLE_HOOKS'true);
/*=================================================  =====================*\
|| ##################################################  ################## ||
|| # vBulletin 4.2.2

Use a editor like notepad++ to edit any files, don't use Notepad or Wordpad.

If that fixes the issue enable plugins again by adding // before the line you added, then navigate to ACP --> Plugins & Products --> Manage Products and disable one mod at a time until you find the one causing the issue.

Once you find the culprit, post in that mods thread what the issue is, and maybe someone in that thread can help. :)

Lynne 01-24-2015 10:14 PM

What version of vBulletin are you running and what version of PHP is on the server?

nerbert 01-24-2015 10:39 PM

Here's the offending code :

Code:

                if (!$vbulletin->GPC['advanced'])
                {
                        if ($vbulletin->GPC_exists['emailupdate'])
                        {
                                $edit['emailupdate'] =& $vbulletin->GPC['emailupdate'];
                        }
                        else
                        {
                                $edit['emailupdate'] = array_pop($array = array_keys(fetch_emailchecked($threadinfo)));
                        }
                        if ($vbulletin->GPC_exists['htmlstate'] AND $foruminfo['allowhtml'])
                        {
                                $edit['htmlstate'] = array_pop($array = array_keys(fetch_htmlchecked($vbulletin->GPC['htmlstate'])));
                        }
                }

It looks obvious to me that you should simply edit out "$array = ". Tried that but it didn't get rid of the warning. Does anyone know what the problem is with that line?

MistViper 01-24-2015 10:46 PM

Quote:

Originally Posted by Lynne (Post 2534401)
What version of vBulletin are you running and what version of PHP is on the server?

4.2.2 and php is 5.3

nerbert 01-24-2015 11:01 PM

I think I got it.

editpost.php lines 315 to 328

Code:

                if (!$vbulletin->GPC['advanced'])
                {
                        if ($vbulletin->GPC_exists['emailupdate'])
                        {
                                $edit['emailupdate'] =& $vbulletin->GPC['emailupdate'];
                        }
                        else
                        {
                                $array = array_keys(fetch_emailchecked($threadinfo)); $edit['emailupdate'] = array_pop($array);
                        }
                        if ($vbulletin->GPC_exists['htmlstate'] AND $foruminfo['allowhtml'])
                        {
                                $array = array_keys(fetch_htmlchecked($vbulletin->GPC['htmlstate'])); $edit['htmlstate'] = array_pop($array);
                        }
                }

This preserves the original line numbers. Anyone want to confirm this?

Lynne 01-25-2015 02:57 AM

Did you already add the below line to your config.php file?

***
As of vBulletin 4.2.2, notices and warnings are no longer suppressed by default like in previous versions of the software. This means that on some servers, you may see warnings that you never saw before. In order to stop them from showing, please add the following line to your config.php file under the <?php line:

PHP Code:

define('SKIP_DS_ERRORS'true); 

***

nerbert 01-25-2015 11:12 AM

Quote:

Originally Posted by Lynne (Post 2534422)
As of vBulletin 4.2.2, notices and warnings are no longer suppressed by default like in previous versions of the software. This means that on some servers, you may see warnings that you never saw before. ......

I'm going to be upgrading to 4.2.3 soon and I want all errors, warnings, and notices enabled AND I want to fix any code that generates them. If I understand this correctly this line you recommend adding to config.php isn't missing in 4.2.2, it must be added because full error/warning in enabled elsewhere. Am I right? If so where is it enabled? Is it at the top of each file or is there some global setting that enables it?

The reason I want to do this is I want all these warnings enabled for developing addons. I remember not long ago in an earlier version all error reporting was suppressed and debugging was ridiculously difficult for new addons.

ozzy47 01-25-2015 11:17 AM

I think in includes/class_core.php in the function vb_error_handler

nerbert 01-25-2015 11:59 AM

That seems to affect what text is shown but it doesn't seem to affect whether error/warning text is shown.


All times are GMT. The time now is 03:56 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01128 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete