Jump to content

Explaination of \IPS\cms\Databases\Dispatcher::i()->output


BomAle

Recommended Posts

I have some difficult to understand why doing on 4.2:

\IPS\Output::i()->output = $output;
if( \IPS\Dispatcher::i()->application->directory == 'cms' )
{
	\IPS\cms\Databases\Dispatcher::i()->output = \IPS\Output::i()->output;
}

on 4.1.19 the code working fine like

\IPS\Output::i()->output = $output;

For example when a member reach the url /articles.html/articles/test-r1/?do=getPoll it seem I must assign also for cms Dispatcher instance the output value, it don't autopopulate the subclass?

EDIT:

The "issue" happen also when try to run via AJAX ?do=edit a record of articles

EDIT 2:

	/**
	 * @brief	Singleton Instance (So we don't re-use the regular dispatcher)
	 */
	protected static $instance = NULL;

This on applications/cms/sources/Databases/Dispatcher.php explain the reason why I must do that on 4.2? :(

Link to comment
Share on other sites

Pages has its own dispatcher and generally handles the output itself, however for some actions the central classes take over and handle the output. The problem was that sometimes the pages 'page' (which can have custom resources assigned, such as custom css or js files) was not always being used correctly, so the page output had to be saved to the appropriate areas.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...