[MediaWiki-l] OutputPage.php won't render with Cometchat

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] OutputPage.php won't render with Cometchat

David Shaw
Any idea why this code causes the page to render blank?
In MW/includes/OutputPage.php, starting at line 3305 we find:

<<<<<

public function getHeadLinksArray() {
  global $wgVersion;

  $tags = array();
  $config = $this->getConfig();

  $canonicalUrl = $this->mCanonicalUrl;
<<<<<

After "$canonicalUrl = $this->mCanonicalUrl;" I inserted these lines per
instruction:

<<<<<

  $tags[‘cometchat-footer-code-link’] = Html::element( ‘link’, array(
   ‘rel’ => ‘stylesheet’,
   ‘type’ => ‘text/css’,
   ‘charset’ => ‘utf-8’,
   ‘href’ => ‘/cometchat/cometchatcss.php’,
) );
  $tags[‘cometchat-footer-code-script’] = Html::element( ‘script’, array(
   ‘type’ => ‘text/javascript’,
   ‘charset’ => ‘utf-8’,
   ‘src’ => ‘/cometchat/cometchatjs.php’,
) );

<<<<<
And the page won't render. There is an associated call in the Vector
template but that is displaying ok. It only blows up when I change
OutputPage.

The folks at Cometchat say it's an issue with caching.

Thank you,

David
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: OutputPage.php won't render with Cometchat

Platonides
On 09/12/15 20:26, David Shaw wrote:

> Any idea why this code causes the page to render blank?
>(…)
> And the page won't render. There is an associated call in the Vector
> template but that is displaying ok. It only blows up when I change
> OutputPage.
>
> The folks at Cometchat say it's an issue with caching.
>
> Thank you,
>
> David

Your email has curly quotes. Was that an artifact of the code or the
email? You need to use ' in php code.

Also, look at your error log. Blank page → PHP error.

Additionally, I'm quite sure the same solution could be done through a
hook, without having to edit the core file OutputPage.php


_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l