Addressing issues upgrading to Backlight 1.0.2

At version 1.0.2 and only five weeks old, Backlight is still in its infancy. As with any newborn, there are occasional hiccups, and we are aware some users have experienced those hiccups in updating from 1.0.1 to 1.0.2. While this has been a minor inconvenience for some users, it has been a net positive for Backlight, as it has us provided a trail of evidence to the hiccups’ source. Ben has been on the case, and we now have fixes.
This blog post serves to cover two common issues in upgrading. Note that
these issues do not affect customers installing 1.0.2 afresh.

Template modules failing to update with the correct resources

In brief, problems could arise immediately after updating from 1.0.1 to 1.0.2 by visiting specific pages in Backlight’s admin before visiting your image galleries. The problem would manifest in certain Javascript files failing to be updated in the template cache, breaking scripts on the page. For example, Photoswipe would fail to launch, and clicking a thumbnail would instead take users to the fallback single-image HTML page.

This can be fixed manually by revisiting the gallery and appending ?reloadModel&skipCache to the URL to force a fresh update of the template cache. This step only needs to be performed once, and only for customers who have experienced issues with the Photoswipe gallery failing to work as intended.

We have found the underlying cause, and this issue should not recur in future updates.

Updates to htaccess to correctly return 404 Not Found on invalid gallery links

Somewhat related, but a bit of a separate thing, the 1.0.2 update also included an updated and improved .htaccess file. This update fixed an issue with Backlight attempting to display galleries for invalid URLs instead of returning a 404 Not Found error. Such requests by search bots resulted in cached gallery templates being generated with invalid paths to Font Awesome.

While new installs coming on board with 1.0.2 will be configured with the updated .htaccess, we were not able to automatically update .htaccess files for users upgrading from 1.0.1, as this may have over-written other changes customers had made to the .htaccess setting in the mean time.

Customers upgrading from 1.0.1 are advised to take the following steps to apply the change to their .htaccess settings:

  • Log into Backlight
  • Click on the Backlight then Settings menu
  • Scroll to the bottom of the page, and click on Show Advanced Settings
  • Click on Edit Settings
  • Edit the contents of the Album .htaccess field, and add ‘#’ to the last three lines that they look like:

[raw]

#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d

#RewriteRule ^(.*)$ %{ENV:BASE}index.php?%{ENV:QS}&page=$1 [QSA,L]


[/raw]

  • Click Save Settings
  • Click on the Backlight then Publisher menu
  • Click on Update Album Files
  • Click Update