We have moved to Github. Please open tickets there.

Opened 3 years ago

Closed 3 years ago

#2377 closed Defect (fixed)

need to know viewtype when plugin loaded

Reported by: cash Owned by:
Priority: normal Milestone: Elgg 1.8.0
Component: Installation Version: 1.7
Severity: minor Keywords:
Cc: brettp Difficulty:

Description

In Elgg's boot loader, the viewtype is set to failsafe until the very end. I think this is mostly to deal with the install process. I have a plugin that needs to know the viewtype when it is loaded.

As a part of the upgrade to the installer, it would be great to not spend so much time in failsafe mode.

Change History (3)

comment:1 Changed 3 years ago by brettp

I had this exact problem a couple days ago and assumed the same thing. Does the installation even need to use the views subsystem? It seems like some of the odd hacks in core and most of the hacks in install are related to trying to force installation through the core engine.

comment:2 Changed 3 years ago by cash

I started playing around with a replacement installer built on 1.8. I'm trying to continue using the engine and views system so that we don't have a lot of duplicate code.

I think the key is to not include the core boot loader in install.php but have it do its own loading of the engine. Then in the core boot loader, add a check for the existence of settings.php and if it doesn't exist, redirect to the install script before the libraries get loaded.

I still need to work out how to handle the case where someone quits the installer before it is finished and hits the main index page again. Perhaps throw an exception with a link to the installer.

comment:3 Changed 3 years ago by cash

  • Resolution set to fixed
  • Status changed from new to closed

The new installer does not use the bootloader so no need for the convoluted logic that puts the view into failsafe while checking if Elgg is being installed.

Note: See TracTickets for help on using tickets.