Adding picture to Front Page Slider breaks Theme

Created on 22 November 2020, over 4 years ago
Updated 11 May 2024, 11 months ago

Problem/Motivation

After adding pictures to the slider, loading the page resulted in 'The website encountered an unexpected error'.
error.log gives 'Call to a member function toUrl() on null in \\htdocs\\mypage\\themes\\business_responsive_theme\\business_responsive_theme.theme on line 162'
That's in business_responsive_theme_get_slider_content(), $file = $node->toUrl()->toString();
As far as I can see, there is no $node variable around.
I notice you recently replaced $file = file_load($fid[0]); in that location, that at least works for me.

Steps to reproduce

Configure Slider by adding custom pictures

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024