phpBB encountered an error building the container due to an installed extension

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
warmweer
Jr. Extension Validator
Posts: 11268
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by warmweer »

wads24 wrote: Sun Oct 07, 2018 12:48 am
3Di wrote: Sun Oct 07, 2018 12:28 am All of your extensions are active, to catch the issue you have to disable ALL of them first.
I'd go to exclude first all of those which aren't in the CDB/validated. I am seeing a bunch of potential culprits there.

Good luck. :)
Which one?
As 3Di mentioned: disable all of them and then start with enabling the non-validated ones (one by one).
Which ones is up to you to find out (you know where you got them).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
wads24
Registered User
Posts: 664
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: phpBB encountered an error building the container due to an installed extension

Post by wads24 »

warmweer wrote: Sun Oct 07, 2018 8:44 am
wads24 wrote: Sun Oct 07, 2018 12:48 am
3Di wrote: Sun Oct 07, 2018 12:28 am All of your extensions are active, to catch the issue you have to disable ALL of them first.
I'd go to exclude first all of those which aren't in the CDB/validated. I am seeing a bunch of potential culprits there.

Good luck. :)
Which one?
As 3Di mentioned: disable all of them and then start with enabling the non-validated ones (one by one).
Which ones is up to you to find out (you know where you got them).
As I have said I have already disabled all of them and still getting the error.
Thanks in advance for a reply.
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by kasimi »

  • Open board root/phpbb/di/container_builder.php
  • Find around line 211

    Code: Select all

    // Don't try to recover if we are in the development environment
  • On a new line above, add

    Code: Select all

    throw $e;
Browse to your ACP, you should see the error that's causing the phpBB encountered an error building the container due to an installed extension message to be displayed. Don't forget to undo the edit afterwards.
User avatar
wads24
Registered User
Posts: 664
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: phpBB encountered an error building the container due to an installed extension

Post by wads24 »

kasimi wrote: Sun Oct 07, 2018 3:01 pm
  • Open board root/phpbb/di/container_builder.php
  • Find around line 211

    Code: Select all

    // Don't try to recover if we are in the development environment
  • On a new line above, add

    Code: Select all

    throw $e;
Browse to your ACP, you should see the error that's causing the phpBB encountered an error building the container due to an installed extension message to be displayed. Don't forget to undo the edit afterwards.
Edit completed.. no other error in admin

Edit undone
Thanks in advance for a reply.
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by kasimi »

What do you see when you add print_r($e); above that line?
User avatar
wads24
Registered User
Posts: 664
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: phpBB encountered an error building the container due to an installed extension

Post by wads24 »

kasimi wrote: Sun Oct 07, 2018 4:55 pm What do you see when you add print_r($e); above that line?
Nothing...

I just see same error after saving a change in admin.
phpBB encountered an error building the container due to an installed extension. For this reason, all extensions have been temporarily disabled. Please try purging your forum cache. All extensions will automatically be re-enabled once the container error is resolved. If this error continues, please visit phpBB.com for support.


Exception:
Thanks in advance for a reply.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: phpBB encountered an error building the container due to an installed extension

Post by david63 »

The error message is saying that all your extensions are disabled but the screenshot you posted before is showing them as enabled.

See Knowledge Base - Disabling all extensions at once to disable your extensions and then re-enable them one at a time.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
wads24
Registered User
Posts: 664
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: phpBB encountered an error building the container due to an installed extension

Post by wads24 »

kasimi wrote: Sun Oct 07, 2018 4:55 pm What do you see when you add print_r($e); above that line?
Thank you kasimi. He found an edit I did Drop the admin login box.

He removed the edit that I did and the error went away.

THank you again kasimi !
Thanks in advance for a reply.
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: phpBB encountered an error building the container due to an installed extension

Post by RMcGirr83 »

Which just goes to prove that one shouldn't install extensions that haven't been validated on here.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

wads24 wrote: Sun Oct 07, 2018 9:38 pm
Thank you kasimi. He found an edit I did Drop the admin login box.

He removed the edit that I did and the error went away.

THank you again kasimi !
I'm having this same problem in my desktop test environment. The link you provide above no longer resolves. Can you clarify what you did to resolve your problem?
User avatar
wads24
Registered User
Posts: 664
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: phpBB encountered an error building the container due to an installed extension

Post by wads24 »

shortmort37 wrote: Fri Oct 19, 2018 1:29 pm
wads24 wrote: Sun Oct 07, 2018 9:38 pm
Thank you kasimi. He found an edit I did Drop the admin login box.

He removed the edit that I did and the error went away.

THank you again kasimi !
I'm having this same problem in my desktop test environment. The link you provide above no longer resolves. Can you clarify what you did to resolve your problem?

Yes, I had commented out the admin log in on admn/index.php

Code: Select all

// Have they authenticated (again) as an admin for this session?
// if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
// {
//	login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
// }
I did this so that I didn't have to log in again under admin link.
I changed back to...

Code: Select all

// Have they authenticated (again) as an admin for this session?
if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
{
	login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
}
Thanks in advance for a reply.
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

Um... OK. But, why did that manifest as an issue with an installed extension? Were all bets off at that point?
User avatar
wads24
Registered User
Posts: 664
Joined: Fri Jun 10, 2005 4:44 am
Name: James

Re: phpBB encountered an error building the container due to an installed extension

Post by wads24 »

shortmort37 wrote: Fri Oct 19, 2018 10:31 pm Um... OK. But, why did that manifest as an issue with an installed extension? Were all bets off at that point?
I did both at the same time, and so it didn't have to do with the extension. I just removed that edit and the error went away. I did read also that it may be due to permissions also.
Thanks in advance for a reply.
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by kasimi »

When commenting out that piece of code, the user session is missing the session_admin flag, causing the page_header() function to be called in some cases, even though in the ACP, the adm_page_header() is expected to always be called. If there happens to be a problem building the container, the adm_page_header() function adds details about the problem to the template variable CONTAINER_EXCEPTION, otherwise it sets it to false. In the template, the CONTAINER_EXCEPTION value is compared strictly to false. However, since page_header() is mistakenly called, that template variable doesn't get set at all and therefore evaluates to null, causing the strict !== false check to pass even though there hasn't been any problem.

TLDR: The error was displayed even though there was no problem with any extension or file permission.
david63 wrote: Sun Oct 07, 2018 5:51 pm The error message is saying that all your extensions are disabled but the screenshot you posted before is showing them as enabled.
If there's an exception while building the container all extensions are skipped so even if they show as enabled, you can trust the error message that the container was built without them.
User avatar
shortmort37
Registered User
Posts: 656
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB encountered an error building the container due to an installed extension

Post by shortmort37 »

kasimi wrote: Sat Oct 20, 2018 10:19 am
TLDR: The error was displayed even though there was no problem with any extension or file permission.
I seem to have gotten myself in the same pickle; I've been operating with this complaint for many months, but apparently innocuously. I thought that if I upgraded my desktop test environment from 3.2.1 to 3.2.3, it might disappear, but no such luck.

I have a mod that permits mp4s to play natively as attachments, as well as treat pdfs as images (preparing a thumbnail), but I don't know enough (yet) to write an extension. I've been tracking the changes I've made to 12 files, and I think I've put back the canonical source in an attempt to diagnose - but to no avail.

I created a test environment on my hosting site that manifests the same problem - http://59plymouth.net/59test - and I've disabled all the extensions, and deleted all the data. I've even removed the code from the /ext directory, but the complaint persists - e.g., if I go into Attachment Settings in the ACP and click submit without making a change, I get the error.

I inserted print_r($e); in 59test/phpbb/di/container_builder.php as suggested, but when I repeat the steps that produce the complaint in the ACP, I don't see the print message - just the complaint. Any advice as to how to further diagnose would be much appreciated.

Dan
Post Reply

Return to “[3.2.x] Support Forum”