coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: BerndS on January 09, 2016, 04:54:54 PM

Title: Fatal Error on blankstrap
Post by: BerndS on January 09, 2016, 04:54:54 PM
Hello,
I have created a gallery that works fine.
I have tried the theme "blankstrap", but that doesn't show any albums. Latest uploades show up.
When I login as admin, I get the message:
error: Call to a member function attributes() on null in /home/www/kunstwerkevonclaudiafabian/themes/blankstrap/theme_listings.php on line 195
When I reduce the window width and the menue button appears, clicking the menue button doesn't have any effect.
What's wrong?
Title: Re: Fatal Error on blankstrap
Post by: ΑndrĂ© on January 09, 2016, 10:39:36 PM
Quote from: BerndS on January 09, 2016, 04:54:54 PM
doesn't show any albums

Does it work with other themes?
Title: Re: Fatal Error on blankstrap
Post by: BerndS on January 12, 2016, 10:23:44 PM
Yes of course. I also used curve to modify that theme.
No problems with other themes (except of curve_responsive which crashes at all)
Title: Re: Fatal Error on blankstrap
Post by: ΑndrĂ© on January 13, 2016, 04:28:00 PM
To fix that issue, open themes/blankstrap/theme_listings.php, find
            $el = &simplexml_load_string('<tmp>'.$category['cat_thumb'].'</tmp>');
            $attribs = &$el->a->img->attributes();
            unset($attribs->title);
            unset($attribs->border);
            $category['cat_thumb'] = $el->a->asXML();

and replace with
            if ($category['cat_thumb']) {
                $el = &simplexml_load_string('<tmp>'.$category['cat_thumb'].'</tmp>');
                $attribs = &$el->a->img->attributes();
                unset($attribs->title);
                unset($attribs->border);
                $category['cat_thumb'] = $el->a->asXML();
            }