I am trying to install backlight on my qnap nas (Backlight-5-Installer-118.zip). When running the installer i get
“The installer was unable to connect to the server. Please wait a few minutes and try again.”
Tried a new clean install and uncommented “skip_ssl_verificartion” in env.php.skel
This gave me back the error "“The installer was unable to connect to the server. Please wait a few minutes and try again.”
Changing the url for get.theturninggate.net/install from https to http in env.php.skel and config.php got me to successfully install.
Seems to be working ok, but now i have the error on page
/backlight/designer/list_templates/
Something went wrong
Unexpected error: Undefined index: page_template_id in TemplateDAO.php on line 105
I’m not sure what could be causing that message. Had you deleted anything from the templates page?
Does the page load below that message? If so can you take a screenshot and post here?
Lastly, what do you see when visiting the galleries page on the main site? E.g. at http://yoursite.com/galleries (where yoursite.com would be the actual address of your site).
Thanks, @msjogren. That is a strange error that should not happen. In general, NAS servers are problematic and have caused various issues due to not providing a consistently configured web environment.
Can you find the file backlight/modules/module-designer/application/dao/TemplateDAO.php on your server and add a line at line 102:
__dd($templateCounts);
So that that part of the file looks like:
public function getTemplateChildCountLookup()
{
$templateCounts = $this->dbHandler->selectRows('SELECT t.page_template_id, count(*) AS child_count FROM template t LEFT JOIN engine e ON t.engine_identifier = e.identifier WHERE e.type IN (\'album\', \'autoindex\', \'theme\') GROUP BY t.page_template_id');
__dd($templateCounts);
$lookup = array();
foreach ($templateCounts as $templateCount) {
$lookup[$templateCount['page_template_id']] = $templateCount['child_count'];
}
return $lookup;
}
After doing so, visit Designer > Templates, and post the contents of that page here?
Thanks. The database query is returning the field name using a different approach to what we usually see. (In technical terms, the query uses a table alias of t, and the column selection of t.page_template_id is being returned with that name literally instead of page_template_id that we expect.
Can you take a look at the PHP Info (available via Admin > Special Links) and report back the PHP version and value for “SQLite Library”?
This error is inconsequential - it results in the Templates page showing zeros for Child Templates rather than the actual value. I’ll put in a workaround, however this type of issue may come up in other parts of Backlight.
I’ll look into whether there is some SQLite setting we can set to control this behaviour.
Thank you @Ben for the directions,
I specified column alias in the query and the error seems to be gone.
ie. SELECT t.page_template_id AS page_template_id,
What i dont understand is why the other queries doesnt generate the error. But it doesnt matter.