Php 7 - Errors on library/XenForo/Template/Helper/Core.php:1671

maxicep

Active member
Hello

When i click the recent-activity page, we take server error and page can't open. Just blank white page with an error.

Code:
Server Error Log
Error Info
TypeError: Argument 1 passed to XenForo_Template_Helper_Core::helperUserNameHtml() must be of the type array, null given, called in /home/nginx/domains/domain.com/public/forum/library/XenForo/Template/Helper/Core.php on line 853 -library/XenForo/Template/Helper/Core.php:1671
Generated By: Admin, 2 minutes ago
Stack Trace
#0 /home/nginx/domains/domain.com/public/forum/library/XenForo/Template/Helper/Core.php(853): XenForo_Template_Helper_Core::helperUserNameHtml(NULL, '', false, Array)
#1 /home/nginx/domains/domain.com/public/forum/internal_data/templates/S.2,L.2,news_feed_page_global.php(220): XenForo_Template_Helper_Core::callHelper('usernamehtml', Array)
#2 /home/nginx/domains/domain.com/public/forum/library/XenForo/Template/Abstract.php(260): include('/home/nginx/dom...')
#3 /home/nginx/domains/domain.com/public/forum/library/XenForo/Template/Abstract.php(191): XenForo_Template_Abstract->_renderInternal('/home/nginx/dom...', Array)
#4 /home/nginx/domains/domain.com/public/forum/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#5 /home/nginx/domains/domain.com/public/forum/library/XenForo/ViewRenderer/HtmlPublic.php(123): XenForo_Template_Public->render()
#6 /home/nginx/domains/domain.com/public/forum/library/XenForo/FrontController.php(637): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#7 /home/nginx/domains/domain.com/public/forum/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#8 /home/nginx/domains/domain.com/public/forum/index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
  ["url"] => string(43) "http://www.domain.com/forum/haber-kaynagi/"
  ["_GET"] => array(1) {
    ["/forum/haber-kaynagi/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}
 
I found the problem with this way.

I was think the problem may related with usernames because if you look the error it is including the "helperUserNameHtml" so it if i look the recent activity page it including sidebar for show online users only. I removed the include sidebar_online_users area and problem fixed :) So i understand that problem is i was changed manually the sidebar_online_user before. Also, i decided the remove sidebar from recent activity page so no problem :)

But anyway, this problem occuring on php 7 only. Php7 doesn't like about rich username viewing or anything.

Unfortunately, yes.

Add-ons can consist of code event listeners, cron entries, content type handlers, template modifications and rather much more. If you disable listeners in config.php you're only disabling listeners, potentially leaving everything else enabled. It's often the case that disabling listeners is enough, but not always.
Then xenforo must create new parameter on config.php for disable all add-ons too :) It may better.

Thank you for your help and info to Tracy and Chris especially ;)
 
Then xenforo must create new parameter on config.php for disable all add-ons too :) It may better.
By definition, this basically can't happen.

The config.php switch is specifically for situations where an add-on prevents you from accessing the control panel. This switch is designed to allow you to access the control panel to explicitly disable the add-on in question. It's not for debugging other sorts of problems. This is one of the reasons we added the quick add-on disabler tools.
 
Php 7 occuring some errors still.

For now, 2 different thread can't reachable. If i try to see thread, white blank page gives error.

Code:
Fatal error: Method XenForo_BbCode_TextWrapper::__toString() must not throw an exception, caught ParseError: Invalid numeric literal in /home/nginx/domains/domain.com/public/forum/internal_data/templates/S.1,L.2,thread_view.php on line 0

With Default theme, disabled plugins. So it should be in core bug.
 
This doesn't really solve the problem.

There are no known issues with PHP 7 related to rich usernames.
Php 7 occuring some errors still.

For now, 2 different thread can't reachable. If i try to see thread, white blank page gives error.

Code:
Fatal error: Method XenForo_BbCode_TextWrapper::__toString() must not throw an exception, caught ParseError: Invalid numeric literal in /home/nginx/domains/domain.com/public/forum/internal_data/templates/S.1,L.2,thread_view.php on line 0

With Default theme, disabled plugins. So it should be in core bug.
That one, at least, is a bug. Actually it's a bug in PHP 7 itself and we reported it to them and they have fixed it in PHP 7.0.2. We have added a workaround in XF 1.5.5. There is a Fixed bug report in the Resolved Bugs forum with a workaround.
 
List of your addons?
I have over 70 addons and all is working as they should on php 7.0.1
List here your addons and we should compare it

Installed Add-ons

Ads Manager
1.17.4

Change Author
2.9

Change Date
1.7

CK Editor in XenForo Back office
1.4.2

CMF Core
1.0.8

CMF Sponsors
1.0.6

CMF Uploads
1.0.1

Conversation Essentials
1.11.1

Conversation Essentials - Post Ratings Compatibility
1.0.1

CTA Featured Threads
2.17.0

Custom Tabs
1.4.1

Defer JS
2.2.3

Digital Point Ad Positioning
1.3.0

Digital Point Better Analytics
3.1.1

ForumBackup
1.1.9a

ForumBackup DropBox
1.0.01

ForumBackup SFTP
1.0.0

Go To Top !
2.2.0

Jump To Permissions
1.0.0

LiquidPro Simple Forms
2.1.9

Minorin
1.0.0

Moderator Essentials
1.11.2

Nodes As Tabs
1.5.1

Post Macros
4.3.0

Post Message Regex Replacer
1.0.0

Post Ratings
1.7.5

Quick Reply Preview
1.4.4

QuoteME !
2.1.1

ragtek Quote Post Conversation
1.1

Reckons Team Google Custom Search
1.0.8

Redis - Zend Cache
1.1.6

Redis backed Views Counters
1.0.5

Report Alerts
2.2.1

Show Deleted
2.1

Space After Smilie
1.0.0

SV - Add to home screen
1.4.1

SV - Responsive Social Sharing Buttons Lite
1.3.5

Tag Essentials
1.5.2

Title Control
1.7

Unread Post Count
1.2.0

User Banners on Member Cards for XenForo 1.2.x
1.0.0

User Criteria Example
1.0

User Upgrade Conversation
1.5

Xen Notices
1.1.0

XenFacil's Widgets
2

XenForo Enhanced Search
1.1.3

XenForo Media Gallery
1.1.3

XenForo Resource Manager
1.2.2

XenMoods
1.1.3

[AD] Sponsor Directory
1.0.2

[bd] Widget Framework
2.6.0-dev

[by PiX-house.com] bank transfer
0.8

[by PiX-house.com] Keyword Management
1.11

[by PiX-house.com] Link Directory
1.8

[by PiX-house.com] SEO Attachment Name
1.1

[FS] Events
1.0.1

[MWS] Attachment Statistics
1.5.6c

[MWS] Daily Statistics
1.3.1

[Nobita] Node Title Length
1.0.1

[Nobita] XenForo Alert Plus
1.0.7

[PE] Holiday Joy
1.0.1

[PE] Message Controls Menu
1.1.2

[rellect] AdBlock Detector
1.7.3

[rellect] Desktop Version For Mobiles
1.2.0

[rellect] Responsive AdminCP
1.2.5

[Tinhte] HTML5 Uploader
1.0.3

[WGBB] Daily Post Count
1.0.3

[WMTech] - Attachment Manager
1.2.4

[WMTech] - Double Post Merge
1.3.1

[XenMods] ElasticSearch Essentials
1.0.0
 
At this stage, with this error, I don't believe this to be a bug or specifically PHP 7 related.

Please try disabling all add ons and try again.
just installed php 7 today and only one of my themes had the same error in op, it triggers whenever i post in any thread

i have php 7.0.9

i will hopefully find the issue but can you shed any light?
 
It will just require the same process as above; narrowing down the cause.

Does it work ok if you re-create the XF default style (create a new style with no parent)?

Does it work ok if you disable all add-ons?
 
It will just require the same process as above; narrowing down the cause.

Does it work ok if you re-create the XF default style (create a new style with no parent)?

Does it work ok if you disable all add-ons?
i have three themes copy of each others, two of them work fine,,,the other one is basically a stripped down version of the two that is having that issue...pretty weird stuff
 
Back
Top Bottom