clickstorm / cs_seo

[clickstorm] SEO
Other
33 stars 49 forks source link

Records of extended tables are missing in the sitemap if the SEO record does not exist. #196

Closed thasmo closed 6 years ago

thasmo commented 6 years ago

I've extended the news table with a cs_seo configuration.

tx_csseo {
    1 = tx_app_news_articles
    1 {
        enable = GP:news

        fallback {
            title = title
            description = abstract
        }
    }
}

This enables the SEO tab for records of the news table.

Problem now is that only records for which the actual SEO inline record was created (and even if all fields are empty) are shown in the extension sitemap.

When there's no SEO inline record, the actual news record does not get rendered in the sitemap.

mhirdes commented 6 years ago

Hi, all news records should be shown. Please be sure, that the table conf etc. is correct https://docs.typo3.org/typo3cms/extensions/cs_seo/Developer/ExtendSitemap/Index.html

thasmo commented 6 years ago

@mhirdes Sorry, with news I did not mean the news extension, I mean a custom table named tx_app_news_articles. The problem I have is with custom tables which don't show up in the sitemap under the circumstances mentioned above.

mhirdes commented 6 years ago

As you can see https://github.com/clickstorm/cs_seo/blob/b12b4714c6d827abd8815f2032208ec02e2d06ea/Classes/UserFunc/Sitemap.php#L300 we check if the field is 0 or if no_index is 0. So I don't know, how you get to this error.

mhirdes commented 6 years ago

did you add the field to your ext_tables.sql?

thasmo commented 6 years ago

@mhirdes Found the problem. The tx_csseo fields are actually null, which seems to cause them to not show up in the sitemap. Is this something the cs_seo would consider as fix, checking for 0 and null?

mhirdes commented 6 years ago

Why are they null? You should use this SQL statement...

CREATE TABLE tx_myext_domain_model_mymod (
      tx_csseo int(11) unsigned NOT NULL default '0',
 );
mhirdes commented 6 years ago

It's fixed in the branch 3x. Thanks for the hint

thasmo commented 6 years ago

@mhirdes Indeed, I changed the field definition to fix it - thanks a lot for implementing the improvement anyway!

vvprodan commented 5 years ago

Hello! I had the following problem, the SEO field did not appear in the news records, although I have already set up a lot of websites with SEO in the news, but this is my first time Kernel version 8.7.22 What could be the problem? Even if we looked in the tx_news config, the tx_csseo field did not appear. Thank you so much before!