• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Call to undefined function get_album() in header.php

Status
Not open for further replies.

SMP

💖 Chevereto Fan
Looking at the error log i found this

PHP Fatal error: Call to undefined function get_album() in /home/site/public_html/app/themes/pic/header.php on line 89

and the line 89 is this one below
Code:
$twitter_card['creator'] = get_album()['user']['twitter']['username'];


PHP:
// Set twitter card
$twitter_card = [
    'card'            => 'summary',
    'description'    => function_exists('get_meta_description') ? get_meta_description() : NULL,
    'title'            => G\str_replace_last(' - ' . CHV\getSetting('website_name'), NULL, get_doctitle()),
    'site'             => CHV\getSetting('twitter_account') ? ('@' . CHV\getSetting('twitter_account')) : NULL
];
switch(true) {
    case G\is_route('image'):
        $twitter_card['card'] = 'photo';
    break;
    case G\is_route('album'):
    case G\is_route('user'):
        $twitter_card['card'] = 'gallery';
        if(G\is_route('album')) {
            $twitter_card['creator'] = get_album()['user']['twitter']['username'];
        } else {
            $twitter_card['creator'] = get_user()['twitter']['username'];
        }
        $list_output = function_exists('get_list') ? get_list()->output_assoc : NULL;
        if(count($list_output) > 0) {
            for($i=0; $i<4; $i++) {
                $twitter_card['image' . $i] = $list_output[$i]['display_url'];
            }
        }
    break;
}
foreach($twitter_card as $k => $v) {
    if(!$v) continue;
    echo '<meta name="twitter:'.$k.'" content="'.$v.'">' . "\n";
}
?>
 
Before you posted this I've already fixed this for the upcoming v3.6.1
 
  • Like
Reactions: SMP
Status
Not open for further replies.
Back
Top