Skip to main content
Topic: Class 'BBC\Autolink' not found (Read 4804 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Class 'BBC\Autolink' not found

Just got this error. Will try to debug further.

Notice: Class 'BBC\Autolink' not found
  • BBC\ParserWrapper->getAutolinkParser() in /sources/subs/BBC/ParserWrapper.php at line 419
  • call_user_func() in /sources/subs/BBC/ParserWrapper.php at line 130
  • BBC\ParserWrapper->getParsersByArea() in /sources/subs/BBC/ParserWrapper.php at line 183
  • BBC\ParserWrapper->parse() in /sources/subs/BBC/ParserWrapper.php at line 224
  • BBC\ParserWrapper->parseSignature() in /sources/Load.php at line 1045
  • loadMemberContext() in /sources/controllers/Profile.controller.php at line 99
  • Profile_Controller->action_index() in /sources/SiteDispatcher.class.php at line 304
  • Site_Dispatcher->dispatch() in /index.php at line 262
  • elk_main() in /index.php at line 192

http://localhost/Elkarte/index.php?action=profile;u=100
LiveGallery - Simple gallery addon for ElkArte

Re: Class 'BBC\Autolink' not found

Reply #1

Only happens on PHP 7.1. 7.0 is fine.
LiveGallery - Simple gallery addon for ElkArte

Re: Class 'BBC\Autolink' not found

Reply #2

Interesting ... do you know what changed in 7.1 that caused this issue?

Re: Class 'BBC\Autolink' not found

Reply #3

O_o

What's the easiest way to have multiple versions of php handy?
Bugs creator.
Features destroyer.
Template killer.

Re: Class 'BBC\Autolink' not found

Reply #4

on my vps handled by serverpilot I can choose from 5 versions of php: 5.4, 5.5, 5.6, 7.0, 7.1
on my laptop using Mint 18 (derivate of Ubuntu 16.04) which comes with php 7.0 I was able to install and switch from php5 to php7, I used this guide to do this:

http://askubuntu.com/questions/761713/how-can-i-downgrade-from-php-7-to-php-5-6-on-ubuntu-16-04/762161#762161
sorry for my bad english

Re: Class 'BBC\Autolink' not found

Reply #5

Quote from: Spuds – Interesting ... do you know what changed in 7.1 that caused this issue?
no..    this may help you http://php.net/manual/en/migration71.php

Quote from: emanuele – O_o

What's the easiest way to have multiple versions of php handy?
wamp

http://www.wampserver.com/en/
LiveGallery - Simple gallery addon for ElkArte

Re: Class 'BBC\Autolink' not found

Reply #6

Hey if I had time to RTFM I would not have asked LOL  :P

I use vagrant for my multiple php versions, so just *nix with multiple php versions installed.  I then ssh into the box and point the web server at whichever version I want to run.  Recently I've started to play with a multi-machine setup where the db is in one instance and the web in the other, then I can share that db across multiple web versions and simply start "up" the version I want so I don't even have to ssh in to the box.

Re: Class 'BBC\Autolink' not found

Reply #7

I kinda failed in setting up multiple php in ispconfig though it is fully working if run directly under ubuntu.  :D

So, normally, I just use UniServer to test multple php in windows.

Re: Class 'BBC\Autolink' not found

Reply #8

On Vagrant works fine with 7.1, I feel like it may be a windows issue, I'll install wamp and see.
Bugs creator.
Features destroyer.
Template killer.

Re: Class 'BBC\Autolink' not found

Reply #9

The mystery deepens !

Re: Class 'BBC\Autolink' not found

Reply #10

Actually, not even php 7 works.
It's windows specific, and even more the problem is stream_resolve_include_path that in 5.6 resolves properly to sources\subs\BBC\Autolink.class.php, while in php 7.x resolves to sources\Autolink.class.php

Any idea before I start reading about this function? (Hint: I would avoid having to read. LOL)
Bugs creator.
Features destroyer.
Template killer.

Re: Class 'BBC\Autolink' not found

Reply #11

AHA!
No need to read, it doesn't like the "absolute" reference \BBC\Autolink that is added by the autoloader.
Remove it may break other things so... we have to check and think about it.
Bugs creator.
Features destroyer.
Template killer.

Re: Class 'BBC\Autolink' not found

Reply #12

Actually, digging a bit more, the autoloader behaves in a completely different manner between windows and linux in php 7 and between windows and linux in general...
 emanuele smells troubles
Bugs creator.
Features destroyer.
Template killer.

Re: Class 'BBC\Autolink' not found

Reply #13

The easiest solution I found so far to the specific problem is to prefix all the namespaces of the BBC classes with ElkArte... :-\
Bugs creator.
Features destroyer.
Template killer.

Re: Class 'BBC\Autolink' not found

Reply #14

@live627 could you try the attached patch?

It's another way to work around the issue.
I'm not sure which one to pick, though.