Skip to content

Commit

Permalink
fix(views): Using sitedescription in meta description tag.
Browse files Browse the repository at this point in the history
fixes #3973
  • Loading branch information
brettp committed Feb 11, 2014
1 parent 38b7e48 commit 66f0691
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions engine/lib/views.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ function _elgg_views_prepare_head($title) {
'content' => 'text/html; charset=utf-8',
);

$params['metas'][] = array(
'name' => 'description',
'content' => elgg_get_config('sitedescription')
);

// favicons
$params['links'][] = array(
'rel' => 'icon',
Expand Down

5 comments on commit 66f0691

@ManUtopiK
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this commit break elgg installation.

@Srokap
Copy link
Contributor

@Srokap Srokap commented on 66f0691 Feb 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any details on what exactly gets broken?

@ManUtopiK
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did git clone [email protected]:Elgg/Elgg.git
and I go to http://localhost/elgg19/Elgg/
I got error exception. In php_error.log :

[12-Feb-2014 11:42:50 Europe/Paris] Exception #1392201770: exception 'DatabaseException' with message 'Elgg couldn't select the database ''. Please check that the database is created and you have access to it.' in /Users/manu/Sites/elgg19/Elgg/engine/classes/Elgg/Database.php:150
Stack trace:
#0 /Users/manu/Sites/elgg19/Elgg/engine/classes/Elgg/Database.php(121): Elgg_Database->establishLink('readwrite')
#1 /Users/manu/Sites/elgg19/Elgg/engine/classes/Elgg/Database.php(102): Elgg_Database->setupConnections()
#2 /Users/manu/Sites/elgg19/Elgg/engine/classes/Elgg/Database.php(303): Elgg_Database->getLink('read')
#3 /Users/manu/Sites/elgg19/Elgg/engine/classes/Elgg/Database.php(191): Elgg_Database->getResults('SELECT value FR...', '', true)
#4 /Users/manu/Sites/elgg19/Elgg/engine/lib/database.php(67): Elgg_Database->getDataRow('SELECT value FR...', '')
#5 /Users/manu/Sites/elgg19/Elgg/engine/lib/configuration.php(496): get_data_row('SELECT value FR...')
#6 /Users/manu/Sites/elgg19/Elgg/engine/lib/configuration.php(107): get_config('sitedescription', 0)
#7 /Users/manu/Sites/elgg19/Elgg/engine/lib/views.php(505): elgg_get_config('sitedescription')
#8 /Users/manu/Sites/elgg19/Elgg/engine/lib/views.php(460): _elgg_views_prepare_head('Welcome')
#9 /Users/manu/Sites/elgg19/Elgg/install/ElggInstaller.php(231): elgg_view_page('Welcome', '?<p>Installing ...', 'default', Array)
#10 /Users/manu/Sites/elgg19/Elgg/install/ElggInstaller.php(247): ElggInstaller->render('welcome')
#11 /Users/manu/Sites/elgg19/Elgg/install/ElggInstaller.php(103): ElggInstaller->welcome(Array)
#12 /Users/manu/Sites/elgg19/Elgg/install.php(20): ElggInstaller->run('welcome')
#13 {main}
[12-Feb-2014 11:42:50 Europe/Paris] Exception #1392201770 : fatal error in exception handler : No database selected

So, now, if I make git checkout 38b7e48 (commit just before this commit), everything works and I can start steps install.

@ManUtopiK
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think elgg_get_config('sitedescription') should not be called if install isn't done...

@brettp
Copy link
Member Author

@brettp brettp commented on 66f0691 Feb 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, @ManUtopiK.

Please sign in to comment.