ld+json in gsdata.php and minicalendar module

  • Oleh Andrieiev
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 3 weeks ago - 3 months 3 weeks ago #163362 by Oleh Andrieiev
ld+json in gsdata.php and minicalendar module was created by Oleh Andrieiev
Hello Tuan. I would like to ask you to fix the Events Booking component a little.
1. Error in declaring the script gsdata.php ld+json. If a list of all events is displayed, then immediately after the s c r i p t type="application/ld+json" there is a simple listing of the events: name, startDate, image etc.
<!!!!!--- s c r i p t type="application/ld AND json" ---!!!!!>
{
"@context":"https:\/\/schema.org",
"@type":"Event",
"name":"Simulation training "Hysteroscopy"",
.....
},
{
"@context":"https:\/\/schema.org",
"@type":"Event",
"name":"Event 2",
.....
}
It is not right. This is not an array. You can check with any validator, like Schema.org or Google Checking rich results. If you list events this way, the search engine will only see the first one. You need to add square brackets at the beginning and end.
<!!!!!!!!
script type="application/ld+json"  ----!!!!!!!!>
[{
"@context":"https:\/\/schema.org",
"@type":"Event",
"name":"Simulation training "Hysteroscopy"",
.....
},
{
"@context":"https:\/\/schema.org",
"@type":"Event",
"name":"Event 2",
.....
}]
Then all events will be visible. If one event is displayed, then now everything is correct.

2. Mini-calendar module. When activated, it reads the parameter "show or not past events". But if you click on the “month forward” or “month ago” buttons, it simply never shows past events.
It's probably not readable somewhere (AJAX): /components/com_eventbooking/themes/default/calendar/mini.php . It would be convenient for me if this parameter were always read from the configuration.

Thanks in advance. Have a nice day!
Last edit: 3 months 3 weeks ago by Oleh Andrieiev.

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

More
3 months 3 weeks ago #163379 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic ld+json in gsdata.php and minicalendar module
Hi Oleh

1. I will check it and get back to you later

2. Could you send me link to the page which the module is being displayed so that I can take a quick look ?

Tuan

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

  • Oleh Andrieiev
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 3 weeks ago #163386 by Oleh Andrieiev
Replied by Oleh Andrieiev on topic ld+json in gsdata.php and minicalendar module
1. Please look at what the validators say for the two pages.
search.google.com/test/rich-results
validator.schema.org/

The first one is edumed.org.ua/events . This is a real page that is generated by your component. The second is edumed.org.ua/events.php . I saved the first page to my computer and simply added square brackets for the events array. On the first one, validators see 1 event. On the second - 14. 

2. edumed.org.ua/ Calendar. January. I specifically created an event for January 1st.

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

  • Oleh Andrieiev
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 2 weeks ago #163461 by Oleh Andrieiev
Replied by Oleh Andrieiev on topic ld+json in gsdata.php and minicalendar module
Hello, Tuan.
I also want to ask. If you are going to correct what I wrote above, then please correct one more thing.
Now you have the following code in gsdata.php (line 86):

$data = $event->short_description;

But, if you work with tinyMCE, then in any case it inserts < p > at the beginning and < / p > at the end. Is it possible to write there something like

$data = strip_tags($event->short_description);

?
Attachments:

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

More
3 months 2 weeks ago #163469 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic ld+json in gsdata.php and minicalendar module
Sorry Oleh. I was busy and forgot about the issue.

Back to your issue, I can confirm the issue with the Google Structured Data plugin. I updated code so that it handles events list properly. Please install this updated version of the plugin to your site and it will be fine

As for strip tags, I am unsure about it. During my test, look like HTML tags are accepted for description of the event, so I will leave it as how it is for now

Regards,

Tuan
Attachments:

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

  • Oleh Andrieiev
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 2 weeks ago #163470 by Oleh Andrieiev
Replied by Oleh Andrieiev on topic ld+json in gsdata.php and minicalendar module
Thank you, Tuan!

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

More
3 months 2 weeks ago #163471 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic ld+json in gsdata.php and minicalendar module
You're welcome.

Tuan

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

Moderators: Tuan Pham Ngoc