#2751 closed defect (fixed)

News not shown in teaser if category name empty

Reported by: michael.ritter Owned by: michael.ritter
Priority: normal Milestone: Cloudrexx 5.0
Component: News Version: 5.0
Severity: normal Keywords:
Cc:

Description

If the name of a category is empty in a language, the news will not be shown in teaser.

Example: Set the name of a category to empty in one language. News of this category will not be shown in teaser anymore.

Change History (3)

comment:1 Changed 23 months ago by michael.ritter

  • Owner changed from comvation to michael.ritter

comment:2 Changed 18 months ago by michael.ritter

  • Status changed from new to assigned

comment:3 Changed 18 months ago by michael.ritter

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed for v5: 848527ee1f08528ba3215e89df4a8ea00dc3ad0e

For existing sites, the following query needs to be executed in order to fix existing inconsistencies:

INSERT IGNORE INTO `contrexx_module_news_locale` 
    (   `news_id`, 
        `lang_id`, 
        `is_active`, 
        `title`, 
        `text`, 
        `teaser_text`
    )
SELECT `nl`.`news_id`, 
       `l`.`id` as langId,
       `nl`.`is_active`, 
       `nl`.`title`, 
       `nl`.`text`, 
       `nl`.`teaser_text` 
FROM `contrexx_module_news_locale` as nl
    LEFT JOIN `contrexx_languages` as nlang 
        ON (`nl`.`lang_id` = `nlang`.`id` AND `nlang`.`is_default` = 1),
`contrexx_languages` as l
    WHERE `l`.`frontend` = 1;

INSERT IGNORE INTO `contrexx_module_news_categories_locale` 
    (   `category_id`, 
        `lang_id`, 
        `name` 
    )
SELECT `cl`.`category_id`, 
       `l`.`id` as langId,
       `cl`.`name` 
FROM `contrexx_module_news_categories_locale` as cl
    LEFT JOIN `contrexx_languages` as nlang 
        ON (`cl`.`lang_id` = `nlang`.`id` AND `nlang`.`is_default` = 1),
`contrexx_languages` as l
    WHERE `l`.`frontend` = 1;
Note: See TracTickets for help on using tickets.