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
Registered User
Posts: 1255
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

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

Post by warmweer » 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).
A bug is a feature that hasn't made it to the manual (yet)

User avatar
wads24
Registered User
Posts: 437
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 » Sun Oct 07, 2018 2:46 pm

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
Extension Customisations
Extension Customisations
Posts: 3297
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 » 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.

User avatar
wads24
Registered User
Posts: 437
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 » Sun Oct 07, 2018 4:28 pm

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
Extension Customisations
Extension Customisations
Posts: 3297
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 » Sun Oct 07, 2018 4:55 pm

What do you see when you add print_r($e); above that line?

User avatar
wads24
Registered User
Posts: 437
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 » Sun Oct 07, 2018 5:02 pm

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
Jr. Extension Validator
Posts: 14925
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

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

Post by david63 » 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.

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
wads24
Registered User
Posts: 437
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 » Sun Oct 07, 2018 9:38 pm

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
Recognised Extension Developer
Posts: 20955
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

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

Post by RMcGirr83 » Sun Oct 07, 2018 11:01 pm

Which just goes to prove that one shouldn't install extensions that haven't been validated on here.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
shortmort37
Registered User
Posts: 400
Joined: Sat Aug 26, 2006 8:40 pm

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

Post by shortmort37 » 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?

User avatar
wads24
Registered User
Posts: 437
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 » Fri Oct 19, 2018 10:28 pm

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: 400
Joined: Sat Aug 26, 2006 8:40 pm

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

Post by shortmort37 » 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?

User avatar
wads24
Registered User
Posts: 437
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 » Sat Oct 20, 2018 12:59 am

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
Extension Customisations
Extension Customisations
Posts: 3297
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 » Sat Oct 20, 2018 10:19 am

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: 400
Joined: Sat Aug 26, 2006 8:40 pm

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

Post by shortmort37 » Sat Oct 20, 2018 2:01 pm

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”

Who is online

Users browsing this forum: Acorn, david63, DavidIQ, dio33, invenio, NathanFtw, Neverlands, rubencm, rxu, Scanialady, stevemaury and 47 guests