Trouble with wordpress after upgrading backlight

I am using wordpress own theme, and my homepage is in wordpress.

I deactivated the plugin, but still gets errormessages, from a different file though:

Warning: Cannot modify header information - headers already sent by (output started at /volume1/web/wordpress/wp-includes/class.wp-styles.php:290) in /volume1/web/backlight/modules/module-framework/Framework.php on line 351

Something went wrong
Unexpected error: session_start(): Cannot send session cache limiter - headers already sent (output started at /volume1/web/wordpress/wp-includes/class.wp-styles.php:290) in AuthHelper.php on line 148

Please report error at https://discourse.theturninggate.net

You can see the messages at the bottom of the homepage www.brathaug.no

Thanks for the file. What’s happening is that your WP Theme appears to be calling Backlight after WP has already started running. I’ve tested this and that shouldn’t be the case.

Are you using PHPlugins? Is there anything else of interest that you’ve done with your theme or site that could be causing it to call Backlight?

Which Backlight index files did you “update?”

I just used the update indexfiles in the backlight menu.

It seems like my problem lies in the setup of the newest version of backlight. I first renamed the backlight directory so that nothing would be loaded. My wordpress files than worked as they should. I then made a complete reinstall of the latest version of backlight and selected update index files. After that neither my wordpress files nor my backlight files seemed to work.

I will try to go through the indexfiles to see if I can find anything odd. This takes some time for mee to do, so I will Get back later.

I doubt this is related to the upgrade of Backlight. It’s more likely to be coincidental.

Can you provide me with FTP access via direct message so that I can investigate?

I agree with you. If I start directly on a backlight-page there is no error message. It must be a coincidence that the upgrade was at the same time.

The trick is to work out how the Backlight code is being accessed. I can work this out if you can provide me with FTP access. Alternatively, this can be worked out by editing the file backlight/modules/module-framework/Framework.php and adding the following lines:

		if (isset($_REQUEST['dbst'])) {
			$dbst = debug_backtrace();
			foreach ($dbst as $line) {
				echo $line['file'].':'.$line['line'].'<br/>';
			}
			die();
		}

Immediately above this line:

		header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

So that the code reads like this:

		if (isset($_REQUEST['dbst'])) {
			$dbst = debug_backtrace();
			foreach ($dbst as $line) {
				echo $line['file'].':'.$line['line'].'<br/>';
			}
			die();
		}

		header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

If you can make that change please let me know. Otherwise, it would be useful to have FTP access to work this out. The above change alone may not help work out the issue.

I tried to put it in the file, but it seems that nothing happened. To be sure I am now restarting the server to see if there is some “garbage” left.
How do I send ftp-info just to you?

Hi @stigbrathaug, thanks for the login. The added code only shows output when appending ?dbst to your URL. When I do this, I can see that the originating call is from index.php at the top of your site. Can you copy and paste the contents of that file into a message?

I’m happy to look into this, even if it doesn’t turn out to be caused by Backlight.

Thanks for the index.php file. It looks like that’s been edited to include the contents of the WP index.php followed by the contents of the top-level index.php file from Backlight. A front page can either be run through WP or Backlight, but not both.

I am very happy that you found the problem so easy. I do not know how this file got edited, but when I removed the backlight-items from the indexfile it started to behave properly. There is still one error abou a class-definition, but I will search further for that.

I do not know if the problem started when I defined a page in backlight, to display an album, and defined it as a front page, in order to show that album on the first page, in addition to the normal front page.

Thank you for your effort!!

Hi @stigbrathaug, I’m glad that solved it and am happy to have been able to help.

For advice on layout, including embedding BL albums, I suggest opening a new topic.

If you are using WordPress as the basis of your site (your home page) then you cannot create Backlight pages.

You can embed Backlight albums into WordPress pages and posts using the [backlight] shortcode.

Thank you so much for your help.

I will supply the new index.php file to you, can you see if I have edited it correctly? I get the error message
Fatal error: Class ‘Framework’ not found in /volume1/web/index.php on line 76

It does not seem to be a problem for the use og the websith though.

In which file do I enter this code?

Not in a file, directly in the WordPress editor, just like any WordPress shortcode.
Watch Matt’s video on the page I linked to.

Thank you, I will try that.

Sorry, I forgot, you’re not using the Backlight Wordpress theme are you?

You need to be using the Backlight theme to use that shortcode.