Giter Club home page Giter Club logo

Comments (13)

mhirdes avatar mhirdes commented on June 27, 2024

Hey, I got a little panic by the description of your ticket. But on our pages we allways set the detail page to noindex in the page settings. So this page is not indexed and not listed in the sitemap.xml. But when this page has a record as parameter there is no noindex on the page. This pages should be indexed.

To set index,follow is not necessary. This is the default.

How do you set the noindex? Also in the page settings?

from cs_seo.

lucmuller avatar lucmuller commented on June 27, 2024

@mhirdes yes, I've tried to setup the index/no_index on the page to exclude the page without details parameter from the sitemap.
But settings this results in having a no_index by default on our records who have the cs_seo IRRE for SEO options.

Did we set up something wrong in our installation ?

Here's how it goes for our installation.
Page :
image
Record :
image
And in the frontend
on the page with the detail of our record :
image

from cs_seo.

lucmuller avatar lucmuller commented on June 27, 2024

imho, the problems is at line 75-77 from MetaTagGeneratorHook :

if ($noIndex === 'noindex' || $noFollow === 'nofollow') {
       $generators['robots'] = ['value' => implode(',', [$noIndex, $noFollow])];
}

the generator is addressed only if the value is no_index or no_follow, thus fallbacking to page configuration if not set.
It should be either set by default to index,follow (my merge proposal)
or adressed to the value of the record in all cases if the value is = 0 or 1 to index or no_index

but I might have missed something ?

from cs_seo.

lucmuller avatar lucmuller commented on June 27, 2024

Removing the condition on the lines above would also do the trick as the $noIndex $noFollow are setup with the record value :

$generators['robots'] = ['value' => implode(',', [$noIndex, $noFollow])];

Thus resulting in having the generator always setup with the record values.

from cs_seo.

mhirdes avatar mhirdes commented on June 27, 2024

I checked it again with a record, that has a SEO record. Also then I get no robots output on the page.

Which TYPO3 and cs_seo vesion do you use?

from cs_seo.

lucmuller avatar lucmuller commented on June 27, 2024

TYPO3 : 12.4.6
cs_seo : 8.1.0

from cs_seo.

mhirdes avatar mhirdes commented on June 27, 2024

MMhhh. I have TYPO3 12.4.8 and the main branch of cs_seo. But this should not make a difference. Can we maybe take a look together on your TYPO3? You can contact me on Slack.

from cs_seo.

lucmuller avatar lucmuller commented on June 27, 2024

Can we maybe take a look together on your TYPO3?
=> Nope, that won't make it ^^
If you consider that it should work out of the box, then something might be wrong on our side.
We'll check, as I did'nt notice anything in the first place.

I'll come back to you !

from cs_seo.

lucmuller avatar lucmuller commented on June 27, 2024

Here's my typoscript setup for meta robots generation.

page.meta.robots.cObject = COA
page.meta.robots.cObject {
	10 = TEXT
	10 {
		value = index
		override = noindex
		override.if.isTrue.field = no_index
	}
	20 = TEXT
	20 {
		value = ,follow
		override = ,nofollow
		override.if.isTrue.field = no_follow
	}
}

If I remove it from my site config, then the meta robots is not rendered at all.

Do you use another kind of configuration to have a better handling of the overriding of the meta ?

Shouldn't this config be setup in cs_seo typoscript ?
I do not find any configuration for page.meta.robots in your cs_seo typoscript config (nor for description or other common meta)

Should we add some configuration in the CsSeo Yaml configuration file for a correct handling of the meta robots ? I guess no. currently we only avec yaml config for our records to overrides and no meta robots specific configuration.

from cs_seo.

mhirdes avatar mhirdes commented on June 27, 2024

You don't need extra TypoScript. The core SEO extension handles the output for pages, the cs_seo for detail pages.

https://github.com/TYPO3-CMS/seo/blob/main/Classes/MetaTag/MetaTagGenerator.php#L119

Again, you don't need to set index,follow because this is the default.

from cs_seo.

lucmuller avatar lucmuller commented on June 27, 2024

Ok, so there's someting I get wrong about TYPO3 and metadata in it's latest version.

As far as I know, typoscript config must be set in order to produce metadata : https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Setup/Page/Index.html#meta

value is the content of the meta tag. If the value is empty (after trimming), the meta tag is not generated.
[...]
the meta tag generated by the plugin will be used. If there is none yet, the one from TypoScript is set.

What I understand is the following :

Cs-seo do not place any content for meta robots if robots AND follow are at 0 in the record.
Then fallback to typoscript config which use, in my case the values of the page.

Would you mind giving me the triggering configuration which should generate metadata without typoscript config ?
Or maybe would you give me the typoscript config you're using for robots metatag ?

from cs_seo.

mhirdes avatar mhirdes commented on June 27, 2024

You don't need extra TypoScript. The core SEO extension handles the output for pages, the cs_seo for detail pages.

https://github.com/TYPO3-CMS/seo/blob/main/Classes/MetaTag/MetaTagGenerator.php#L119

from cs_seo.

lucmuller avatar lucmuller commented on June 27, 2024

Ok ! I've got the point.
My problem is that i us an override that is no longer useful.

override = noindex
override.if.isTrue.field = no_index

Thanks a lot.

By the way, you still need to register the meta robots to a default value

page.meta.robots = index,follow

Even bootstrap package sets it with a constants
https://github.com/benjaminkott/bootstrap_package/blob/master/Configuration/TypoScript/setup.typoscript#L307

from cs_seo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.