Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zenimagine created an issue. See original summary.

cllamas’s picture

Hi, if you tell me more or less how to create a new type of tag I could add Product and Service by myself.

Eric Heydrich’s picture

Assigned: Unassigned » Eric Heydrich

Hi, I will add the Product Type.

zenimagine’s picture

Very well thank you

Eric Heydrich’s picture

Please test Product Schema.org type. If it works fine, I will go to the next element.

Eric Heydrich’s picture

Status: Active » Needs review
cllamas’s picture

Amazingly fast work! but I'm not sure the patch is correct. I get errors when applying it

modules/contrib/schema_metatag  master ✗                                                                                              1d ✖ ⚑ ◒  ⍉
▶ patch -p1 < schema_metatag-2903107-5.patch
patching file schema_product/schema_product.info.yml
patching file schema_product/schema_product.module
patching file schema_product/src/Plugin/metatag/Group/SchemaProduct.php
can't find file to patch at input line 53
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/schema_product/src/Plugin/metatag/Tag/SchemaProductDescription.php b/schema_product/src/Plugin/metatag/Tag/SchemaProductDescription.php
|index 1ee5e4a..89fb60a 100644
|--- a/schema_product/src/Plugin/metatag/Tag/SchemaProductDescription.php
|+++ b/schema_product/src/Plugin/metatag/Tag/SchemaProductDescription.php
--------------------------
File to patch:
Eric Heydrich’s picture

Edited and tested the patch.

philsward’s picture

Is "Product" not available for 7.x or am I simply missing it? Any chance to get a backport?

agarzola’s picture

Hello! I’ve added a small patch (#9) that creates a Recipe type. It only has a type, name, and description (as that is what we need at the moment), but someone else can run with this and flesh out the rest of the Recipe properties.

Cheers!

ChristophWeber’s picture

Patch #10 works great for me. Thanks agarzola!
I plan to extend it when I have time, at minimum to the level that I need, and maybe for the full recipe schema if I'm totally in the groove.

Patch #8 applied fine, but left duplicate files in the main schema_metatag directory. A bit of manual cleanup and things are clean.

ChristophWeber’s picture

I rerolled the patch from #8 so it applies schema_product cleanly from the base module directory.

@philsward Correct, no patches for 7.x-1.x yet. I plan turn my attention to the D7 release once D8 has its stuff ready to go.

ChristophWeber’s picture

Title: Product, service and recipe » Product and service
Issue summary: View changes
ChristophWeber’s picture

Here's a patch that updates Product schema to include AggregateRating. It incorporates and supersedes schema_metatag-2903107-5.patch, schema_metatag-2916438-2.patch and new code to make Product schema complete enough to validate at Google without errors and warnings. As such Product could be considered a minimally viable schema now. Please test.

ChristophWeber’s picture

Here's a patch providing Service schema. I am unsure what exactly people are looking for in the Service schema type. Generally, I prioritize what Google lists at https://developers.google.com/search/docs/guides/search-gallery, but Service or Service subcategories don't appear there. So I am providing a straight up clone of Product to get this started.

DamienMcKenna’s picture

Assigned: Eric Heydrich » Unassigned

  • KarenS committed 42e8ba0 on 8.x-1.x authored by ChristophWeber
    Issue #2903107 by ChristophWeber, Eric Heydrich, agarzola, zenimagine,...
KarenS’s picture

Status: Needs review » Fixed

I think this is a reasonable pass at some basic properties for product and service. If someone needs others they can provide a patch. Plus this also gets a basic AggregateRating base in.

Thanks!

KarenS’s picture

Status: Fixed » Patch (to be ported)

Let's backport this to D7.

KarenS’s picture

Version: 8.x-1.0-rc4 » 7.x-1.x-dev
KarenS’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Patch (to be ported) » Fixed

I'm going to create a separate issue for this.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.