Skip to content

Commit

Permalink
Fixed Publisher FallBack bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Treur committed Oct 25, 2021
1 parent e977065 commit 614f483
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion system/user/addons/seo_lite/addon.setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'author_url' => 'https://0to9.nl',
'name' => 'SEO Lite (v2)',
'description' => 'The no-brainer approach to SEO for ExpressionEngine. This module is a fork of SEO Lite (https://github.com/bjornbjorn/SEO-Lite)',
'version' => '2.0.1',
'version' => '2.0.2',
'namespace' => '0to9\SEO-Lite-2',
'settings_exist' => TRUE,
);
2 changes: 1 addition & 1 deletion system/user/addons/seo_lite/mcp.seo_lite.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function __construct( $switch = TRUE )

ee('CP/URL', 'addons/settings/seo_lite/audit_entry');

ee()->cp->add_to_head("<link rel='stylesheet' href='" . URL_THIRD_THEMES . "seo_lite/css/seo_lite.css?v2.0.1'>");
ee()->cp->add_to_head("<link rel='stylesheet' href='" . URL_THIRD_THEMES . "seo_lite/css/seo_lite.css?v2'>");
}

function index()
Expand Down
6 changes: 3 additions & 3 deletions system/user/addons/seo_lite/upd.seo_lite.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class Seo_lite_upd {

var $version = '2.0.1';
var $version = '2.0.2';
var $module_name = "Seo_lite";

/**
Expand Down Expand Up @@ -185,11 +185,11 @@ function install()

// insert default config
$this->EE->db->insert('seolite_config', array(
'template' => "<title>{title}{site_name}</title><meta name='keywords' content='{meta_keywords}' /><meta name='description' content='{meta_description}' /><link rel='canonical' href='{canonical_url}' /><meta name='robots' content='{robots_directive}' /><!-- Open Graph --><meta property='og:title' content='{og_title}' />{if og_description}<meta property='og:description' content='{og_description}' />{/if}{if og_type}<meta property='og:type' content='{og_type}' />{/if}{if og_url}<meta property='og:url' content='{og_url}' />{/if}{if og_image}<meta property='og:image' content='{og_image}' />{/if}<!-- Twitter Card --><meta property='twitter:title' content='{twitter_title}' />{if twitter_type}<meta property='twitter:card' content='{twitter_type}' />{/if}{if twitter_description}<meta property='twitter:description' content='{twitter_description}' />{/if}{if twitter_image}<meta property='twitter:image' content='{twitter_image}' />{/if}<!-- generated by SEO Lite (v2) (0to9 Creative Impact Agency) -->",
'template' => "<title>{title}</title><meta name='keywords' content='{meta_keywords}' /><meta name='description' content='{meta_description}' /><link rel='canonical' href='{canonical_url}' /><meta name='robots' content='{robots_directive}' /><!-- Open Graph --><meta property='og:title' content='{og_title}' />{if og_description}<meta property='og:description' content='{og_description}' />{/if}{if og_type}<meta property='og:type' content='{og_type}' />{/if}{if og_url}<meta property='og:url' content='{og_url}' />{/if}{if og_image}<meta property='og:image' content='{og_image}' />{/if}<!-- Twitter Card --><meta property='twitter:title' content='{twitter_title}' />{if twitter_type}<meta property='twitter:card' content='{twitter_type}' />{/if}{if twitter_description}<meta property='twitter:description' content='{twitter_description}' />{/if}{if twitter_image}<meta property='twitter:image' content='{twitter_image}' />{/if}<!-- generated by SEO Lite (v2) (0to9 Creative Impact Agency) -->",
'site_id' => $site_id,
'default_keywords' => 'your, default, keywords, here',
'default_description' => 'Your default description here',
'default_title_postfix' => ' |&nbsp;',
'default_title_postfix' => ' |&nbsp;[SITENAME]',
'default_og_description' => '',
'default_og_image' => '',
'default_twitter_description' => '',
Expand Down
2 changes: 1 addition & 1 deletion system/user/addons/seo_lite_publisher/addon.setup.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

if (!defined('SEOLITE_PUBLISHER_VERSION')) {
define('SEOLITE_PUBLISHER_VERSION', '2.0.1');
define('SEOLITE_PUBLISHER_VERSION', '2.0.2');
}

return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function seo_lite_tab_content($where, $table_name)
$status = $this->currentStatus;

/*
if (ee()->publisher_setting->show_fallback()) {
if (ee()->publisher_setting->showFallback()) {
$translatedWhere = [
'publisher_lang_id' => $langId,
Expand Down Expand Up @@ -245,7 +245,9 @@ public function seo_lite_fetch_data($where, $table_name)
{
$langId = $this->currentLanguageId;
$status = $this->currentStatus;
if ($this->publisherSetting->show_fallback()) {


if ($this->publisherSetting->showFallback()) {
/** @var CI_DB_result $q */
$translatedWhere = [
'publisher_lang_id' => $langId,
Expand Down

0 comments on commit 614f483

Please sign in to comment.