schema.org Publisher value needed but can't find the way to add it

More
5 years 2 months ago #77308 by flodariege
Hello,

I am currently working on replacing the old microformats tags I was using by JSON-LD, and everything is almost OK, at one exception:

Under the Article section of Google structured data test, I have 1 error:
the field Publisher is missing, as you can see here:



I tried to find where I was supposed to complete this missing information, but as you guess, I did not find.
All I found is a way to say FC that my article item type is an Article, which is good, but did not find any "publisher" field.

Any help would be very much appreciated ;)

Flo
France

Dare to dream, believe the unbelievable, never take no for an answer
Attachments:

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #77317 by ggppdk
Hello

hhmm i am thinking flexicontentent does store who is the "publisher"

in your case the item owner is also the publisher ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #77319 by flodariege
The Publisher is normally not a person, it is an Organization.
In the case of a personal blog, it could be a person, but since my website is not a blog, it would be a lot better to have Publisher = the name of the enterprise.

If only I knew in which php files I am suppose to dig to find what is writing the JSON-LD script, I would add it myself (it would always be the same value : Rouch Energies)

Would you have an idea ?

Dare to dream, believe the unbelievable, never take no for an answer

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago - 5 years 2 months ago #77320 by ggppdk
Hello

i think it is best to create a new text field
that will use a new layout file
  1. Create a new text field and assign it to your item types
    configure it to be hidden in item form if you will use the same value for all cases
    otherwise you can let it be editable in item form

    if you choose to hide it, then go to default value (viewing Tab) and set a default value and select to show this value instead of empty display
  2. Create a new custom layout duplicating file
    /plugins/flexicontent_fields/text/tmpl/value_default.php
    as
    /plugins/flexicontent_fields/text/tmpl/value_custom_publisher.php
  3. Select the new layout in the field configuration
  4. Edit the new layout file to only include the microdata info and not to display any visible HTML
  5. Finally add the field to a template position to display it


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 5 years 2 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
5 years 2 months ago #77322 by flodariege
Hi

OK, I'm going to try this, but are you sure it is going to fix the problem with the existing JSON-LD script that can be found in the middle of the og: meta tags of any of my articles (for example this one:
www.rouchenergies.fr/chauffage/pompe-a-c...on-installateur.html )
like this:
Code:
<meta property="og:title" content="Choisir le bon installateur pour votre PAC air-eau" /> <script type="application/ld+json">{"@context":"http:\/\/schema.org\/","@type":"Article","mainEntityOfPage":"https:\/\/www.rouchenergies.fr\/chauffage\/pompe-a-chaleur-air-eau\/choisir-le-bon-installateur.html","inLanguage":"fr-FR","image":{"@type":"ImageObject","url":"https:\/\/www.rouchenergies.fr\/images\/logos\/qualitenr\/installateur\/installateur-qualipac-2019-1200x630.jpg","width":1200,"height":630,"fileFormat":"image\/jpeg"},"author":{"@type":"Person","name":"Florence Rouch"},"articleSection":"Pompe \u00e0 chaleur air eau en Ari\u00e8ge et Haute Garonne","dateModified":"2019-03-31T13:09:26+0200","datePublished":"2013-11-30T16:48:55+0100","headline":"Choisir le bon installateur pour votre pompe \u00e0 chaleur air-eau","name":"Choisir le bon installateur pour votre pompe \u00e0 chaleur air-eau","description":"Pour r\u00e9ussir la mise en \u0153uvre de votre PAC, ou pompe \u00e0 chaleur air-eau, de sa conception \u00e0 son entretien en passant par son installation, choisissez une entreprise qualifi\u00e9e ! Voici quoi v\u00e9rifier."}</script> <meta property="og:site_name" content="Rouch Energies" />

If only I knew what if the file that is generating this script, I would add:
Code:
publisher":{"@type":"Organization","name":"Rouch Energies"}

I'm pretty sure it is a script generated by Flexicontent, right?

Dare to dream, believe the unbelievable, never take no for an answer

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #77340 by flodariege
Hello again,

I tried to add a new field, it doesn't change anuything, but maybe I did something wrong:

It is a text field.
I assigned it to my item type (Article).

In the tab "formulaire de saisie", I chose to hide it both in frontend and backend.

Then on the right side of the screen (FIELD TYPE specific configuration):

Tab Edition:
Tab Values: Use the field as a group = no / default = Rouch Energies (the name of the organization which is the publisher, but I don't understand how this can turn into publisher":{"@type":"Organization","name":"Rouch Energies"} ...??)

Tab Appearance / tab Layout :
Values layout : custom_publisher (after I duplicated it, and I have some question about this file)

Tab SEO :
Support Microdata / microdata property : publisher (please note that this property IS in the microdata list)

Then I put this new text field in the renderonly position of my item template.

About the php file :

I replaced style="display: inline" by style ="display: none".

But I am a bit confused about this section of this file :
Code:
// Add microdata to every value if field -- is -- in a field group if ($is_ingroup && $itemprop) $field->{$prop}[$n] = '<div style="display:none" itemprop="'.$itemprop.'" >' .$field->{$prop}[$n]. '</div>'; $n++; if (!$multiple) break; // multiple values disabled, break out of the loop, not adding further values even if the exist

To me, it looks like if nothing is going to happen if field is NOT in a field group.
Which is not, right?

I ran another test over Google Structured Data, and I still have the Publisher value missing.




I still think it would be a lot easier if only I could add:
Code:
publisher":{"@type":"Organization","name":"Rouch Energies"}
in the php file that writes the Article microdata ...
But to do this, I need to know which file is writing the code.
Would you please tell me?


Thank you.

Dare to dream, believe the unbelievable, never take no for an answer

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.364 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline