phpBB 3.2.0-a1 released

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
User avatar
david63
Registered User
Posts: 355
Joined: Mon Feb 07, 2005 7:23 am

Re: phpBB 3.2.0-a1 released

Post by david63 »

Not sure as to whether this is a bug report as I cannot seem to pin down why/how this is happening.

I was "playing around" with some extensions on my 3.2 test board and was repeatedly deleting the cache (production) and carried on without any problems. Then all of a sudden when I deleted the cache I was getting a General error "The requested environment production is not available." Deleting the cache again made no difference - I am still getting the error. The only way that I seem to be able to get back into my board is to restore the deleted copy of the cache.

Now I am prepared to accept that I have at least one error in one or more extensions but I cannot work out what is generating that error, or how to debug it.
David
Remember: You only know what you know -
and you do not know what you do not know!

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: phpBB 3.2.0-a1 released

Post by Nicofuma »

It's often related to your services configuration. If it's the case you can have the real error by removing the try/catch in common.php. That's something I'm planning to do automatically when debug is on but I didn't found the time yet
Member of the phpBB Development-Team
No Support via PM

User avatar
david63
Registered User
Posts: 355
Joined: Mon Feb 07, 2005 7:23 am

Re: phpBB 3.2.0-a1 released

Post by david63 »

Nicofuma wrote: Thu Dec 10, 2015 12:54 pm It's often related to your services configuration. If it's the case you can have the real error by removing the try/catch in common.php. That's something I'm planning to do automatically when debug is on but I didn't found the time yet
It was indeed due to a "bad" services configuration and once I realised that then I could fix it quite easily and the reason why deleting the cache had no affect was because this check is being done before the cache is created.

This does, however, raise two issues:

1. The error message is not very helpful.

2. Once you get this error then there is no way back into your board unless you know what has caused the error and you can "reverse" it. If the error is caused by an extension then removing the extension from the ext table in the database, and deleting the cache, will recover the situation but many users will not know how to do this and many others will not have the confidence to do it and there will be some who in trying to do it, despite all the warnings, will mange to totally screw up their boards. The bigger issue though is if this error is caused by a previously undetected bug in the core code - a user would have no idea what/where the error was and would probably not have any idea how to fix it and could not get back into their board.

This error will be a nightmare for anyone to support.

(Do you want a ticket creating?)
David
Remember: You only know what you know -
and you do not know what you do not know!

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: phpBB 3.2.0-a1 released

Post by Nicofuma »

Like I said, it's planned to enable a true debug mode in the dev environment. Allowing us to display a better error message in this case.

About the failing extension that's another issue... theoretically it should be possible to reboot the application with the extension disabled when an error is detected in an extension but that's not so easy to do (if we want to support something else than the service definition error).

It's always possible to disable an extension using the CLI (bin/phpbbcli extension:disable --safe-mode <the ext name>)

You can create a ticket yes (but first check if there isn't already one, and if it's the case just bump it)
Member of the phpBB Development-Team
No Support via PM

User avatar
david63
Registered User
Posts: 355
Joined: Mon Feb 07, 2005 7:23 am

Re: phpBB 3.2.0-a1 released

Post by david63 »

One thing that I have noticed with 3.2 is that when developing extensions I find that I have to delete the cache files far more often than I did with 3.1

In the 3.1 I could edit almost any file and it would take effect immediately, now with 3.2 whenever I change anything it does not take effect unless I empty the cache.

So the question is - what has changed with the cache in 3.2 and is this intentional?
David
Remember: You only know what you know -
and you do not know what you do not know!

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: phpBB 3.2.0-a1 released

Post by Nicofuma »

Did you set your environment to development? (@define('PHPBB_ENVIRONMENT', 'development') in your config.php file)
Member of the phpBB Development-Team
No Support via PM

User avatar
david63
Registered User
Posts: 355
Joined: Mon Feb 07, 2005 7:23 am

Re: phpBB 3.2.0-a1 released

Post by david63 »

Nicofuma wrote: Thu Dec 17, 2015 2:31 pm Did you set your environment to development? (@define('PHPBB_ENVIRONMENT', 'development') in your config.php file)
No - I did not know about that.

However when I do set it I get
The requested environment development is not available.
David
Remember: You only know what you know -
and you do not know what you do not know!

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 299
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: phpBB 3.2.0-a1 released

Post by Nicofuma »

@define('PHPBB_ENVIRONMENT', 'development'); i working fine for me... could you remove the try/catch in common.php to see the real error?
Member of the phpBB Development-Team
No Support via PM

User avatar
david63
Registered User
Posts: 355
Joined: Mon Feb 07, 2005 7:23 am

Re: phpBB 3.2.0-a1 released

Post by david63 »

With try/catch removed I am getting Fatal error: Call to a member function get() on null in C:\htdocs\phpbb_dev32\common.php on line 114
Line 114 is $phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));

I get the same error with "production" environment when try/catch is removed
David
Remember: You only know what you know -
and you do not know what you do not know!

User avatar
mrgoldy
Former Team Member
Posts: 64
Joined: Fri Dec 18, 2015 9:41 pm
Location: The Netherlands
Contact:

Re: phpBB 3.2.0-a1 released

Post by mrgoldy »

How did you get around this issue, david63?

Not sure how I can delete the try/cache from the common.php without getting any other errors?
Ive got the exact same error and with a rather large services.yml it's hard to find the exact error..

EDIT: Everything works fine now, as soon as I changed back to 'production' environment. Error re-occurs if I go back to 'development' environment.
What's the benefit/difference for this environment anyway?
phpBB Studio Proud member of the Studio!

Post Reply