🇨🇳China @fishfree

Account created on 19 August 2007, almost 17 years ago
#

Recent comments

🇨🇳China fishfree

@jrockowitz I today find there is "Map" subfield type of the similar feature of arbitrary inputting key-value paris in the custom_field, which is already supported by schemadotorg. So if the JSON+LD and other mappings with the "Map" subfield of custom_field can be better working, it would be wonderful!

🇨🇳China fishfree

@kkohlbrenner After patching, I still found nowhere to configure multiple authsources in Drupal.

🇨🇳China fishfree

@jrockowitz No. physical module can only support dimension and measurement properties, not arbitrary. I test several modules before posting here.

🇨🇳China fishfree

@jrokowitz Thank you! I did as your tip. Add in the custom field hasMeasurement I add a new sub-field "name" of type text, which is also correspondent to the schema.org QuatitativeValue text.
Add also add the YAML on page /admin/config/schemadotorg/settings/properties#edit-schemadotorg-custom-field as below:

hasMeasurement:
  schema_type: QuantitativeValue
  schema_properties:
    name:
      data_type: string
    value:
      data_type: integer
    minValue:
      data_type: integer
    maxValue:
      data_type: integer
    unitCode:
      data_type: string
    unitText:
      data_type: string

Now the output JSON+LD is as below:

{
  "@context": "https://schema.org",
  "@type": "Product",
  "@url": "https://mycompany.com/test-product-3",
  "name": "test product 3",
  "hasMeasurement": [
    {
      "@type": "QuantitativeValue",
      "value": {
        "@type": "Text",
        "name": "20"
      },
      "unitCode": "CM",
      "unitText": "centimeters",
      "name": "Length"
    },
    {
      "@type": "QuantitativeValue",
      "value": {
        "@type": "Text",
        "name": "28"
      },
      "unitCode": "KG",
      "unitText": "kilograms",
      "name": "Weight"
    }
  ]
}

The questions are:

  1. Why the value has nested key-values of @type and name? I think it unreasonable, esp. I mapped it to integer type.
  2. Shouldn't the name, value, unitCode and unitText are all properties of QuantitativeValue? I doubt the nesting hierarchy of the JSON is wrong.
🇨🇳China fishfree

@Marcus @andrew Thank you for your great work! However, I got "The website encountered an unexpected error. Try again later" when adding a search_api server of backend "Milvus" with your patch. On page /admin/reports/dblog, the detailed error is as below:

Exception: Serialization of 'Closure' is not allowed in serialize() (line 14 of /var/www/html/drupal10/web/core/lib/Drupal/Component/Serialization/PhpSerialize.php).

#0 /var/www/html/drupal10/web/core/lib/Drupal/Component/Serialization/PhpSerialize.php(14): serialize()
#1 /var/www/html/drupal10/web/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php(111): Drupal\Component\Serialization\PhpSerialize::encode()
#2 /var/www/html/drupal10/web/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php(127): Drupal\Core\KeyValueStore\DatabaseStorageExpirable->doSetWithExpire()
#3 /var/www/html/drupal10/web/core/lib/Drupal/Core/Form/FormCache.php(197): Drupal\Core\KeyValueStore\DatabaseStorageExpirable->setWithExpire()
#4 /var/www/html/drupal10/web/core/lib/Drupal/Core/Form/FormBuilder.php(463): Drupal\Core\Form\FormCache->setCache()
#5 /var/www/html/drupal10/web/core/lib/Drupal/Core/Form/FormBuilder.php(645): Drupal\Core\Form\FormBuilder->setCache()
#6 /var/www/html/drupal10/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm()
#7 /var/www/html/drupal10/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#8 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#9 /var/www/html/drupal10/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#10 /var/www/html/drupal10/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /var/www/html/drupal10/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#12 /var/www/html/drupal10/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#13 /var/www/html/drupal10/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#14 /var/www/html/drupal10/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#15 /var/www/html/drupal10/web/modules/contrib/bat_api/src/StackMiddleware/BatApiMiddleware.php(39): Symfony\Component\HttpKernel\HttpKernel->handle()
#16 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Drupal\bat_api\StackMiddleware\BatApiMiddleware->handle()
#17 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#18 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#19 /var/www/html/drupal10/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#20 /var/www/html/drupal10/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#21 /var/www/html/drupal10/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#22 /var/www/html/drupal10/web/modules/contrib/services/src/StackMiddleware/FormatSetter.php(45): Drupal\page_cache\StackMiddleware\PageCache->handle()
#23 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\services\StackMiddleware\FormatSetter->handle()
#24 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#25 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#26 /var/www/html/drupal10/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#27 /var/www/html/drupal10/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#28 /var/www/html/drupal10/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#29 {main}

My search_api & openai & search_api_ai & search_api_solr are all the latest dev version.
I tried adding a solr backend server successfully.

FYI: https://julian.pustkuchen.com/de/fix-drupal-error-exception-serializatio...

🇨🇳China fishfree

@jrockowitz Thank you very much! Now I upgraded to the latest dev version and updated the database, deleted the old config on page /admin/config/schemadotorg/settings/properties#edit-schemadotorg-custom-field and appended you-provided new yaml strings, created a new Product node, now the output JSON+LD still has only the last value "weight" as below:

{
  "@context": "https://schema.org",
  "@type": "Product",
  "@url": "https://mycompany.com/test-3",
  "name": "test 3",
  "hasMeasurement": {
    "@type": "QuantitativeValue",
    "weight": {
      "@type": "QuantitativeValue",
      "value": "234"
    }
  }
}
🇨🇳China fishfree

@jrockowitz Thank you very much! Now the generated JSON+LD has but only has the last value of "weight", no "length", as below:

{
  "@context": "https://schema.org",
  "@type": "Product",
  "@url": "https://mycompany.com/test-product-0",
  "name": "test product",
  "hasMeasurement": {
    "@type": "QuantitativeValue",
    "weight": "23423"
  }
}

Is it a little buggy?

🇨🇳China fishfree

OK. Thank you for your suggestion!

🇨🇳China fishfree

@Marcus Thank you! My fault: I forgot to input some text in the base text field, even which is not related to my OCR task.
Unstructured uses tesseract-ocr, which is quite awful for my situation. GPT-4o is much better.

🇨🇳China fishfree

@Marcus Thank you, Marcus. I tried as the screenshots below, still no luck. What's wrong with my config? Because I'd like to extract text from image, so I didn't use the {{ context }} text field.

🇨🇳China fishfree

@Marcus Thank you! For me, there is a "OpenAI Video To Text", no "OpenAI Image to Text", and I can only select a file field as source, no image field. I don't know if it works with image fields & "OpenAI Video To Text"?

🇨🇳China fishfree

@Ravi1890 I'd like to extract text from images with OpenAI's OCR ability.

🇨🇳China fishfree

@claudiu Thank you for your explanation. Why do you specify UUID as the URI in DefaultRdfUriGenerator.php file? Are there some domain specifications or best practice guidelines?

🇨🇳China fishfree

Changing any field cardinality from single value to unlimited also triggers this error. It seems due to any AJAX operations.

🇨🇳China fishfree

It turned out that it was caused by an entity_reference field, the RDF mapping of the target entity bundle is not enabled. We must enable RDF mappings of all the chained entity_reference fields.

🇨🇳China fishfree

@Knurg Thanks! I don't know why I cannot upload images in comments. I sent them to you via chat.wiss-ki.eu? :D

🇨🇳China fishfree

@Knurg Thanks!
I tried to create a new pathbuilder as the screenshot below:

And generated the correspondent bundle and fields.
Then I create an entity instance of this new pathbuilder bundle, and cloned a view of mirador_viewer and changed the filter to "Wisski Entity: Bundle/Group (= Collection with objects)", but no images showing up.

The screenshot of the built-in example_pathbuilder in the docker container is as below, you can see I constructed my "collection_with_objeccts" pathbuilder with the reversed path against the built-in one.

🇨🇳China fishfree

@Knurg Thanks! The Mirador View seems hardcoded reading the img_image_for_mirador path field as images source. As your suggestion, do we also need add this path in the new pathbuilder? If do, it's not elegant, for we need to maintain content twice: once from the WissKI object group, once from the WissKI collection path.

🇨🇳China fishfree

@Knurg Thank you! What do you mean by "form" here? The pathbuilder form or an WissKI entity entity-reference field?

🇨🇳China fishfree

@Knurg Thank you! I'd like to create/edit a SKOS ontology for K-12 eduation resources in Drupal. SKOS is very suitable for knowledge/concepts organization.

🇨🇳China fishfree

@Knurg Yes, I want only one manifest for all objects objects exposed by a views view. Of course, it's best we can configure this option.

🇨🇳China fishfree

@Luke, this repo supports inline character by character style. Would you pls have a look in it?

🇨🇳China fishfree

@Knurg The key problem is that WissKI generated one manifest per object. If we show multiple objects in a Mirador viewer view, it would show up with equivalent numbers of windows. You can have a try :-)

🇨🇳China fishfree

Finnaly, I noticed it was because WissKI generated one manifest for every object on page /objects. I think it's better to generate one manifest for all objects in one collection.

🇨🇳China fishfree

@Knurg There is no error in my browser console. When I export Mirador workspace settings, I find the settings are the exactly as I set in the Views window_settings textbox.
When I changed the Views pager settings as Use pager:Display a specified number of items | 2 items, it showed as below:

What I want is: Views pager: Display multiple items, But Mirador still shows only one image with last/next pager icon buttons.

🇨🇳China fishfree

@a.kovrigin Thank you! No wonder. Now I see.
However, I think it much more meaningful to show metatags on the source entity submission result view page, i.e. /node/[nid]/webform/submission/[sid] . This way, the user-inputted web-component values can used as metatags, then the metatags are dynamic.

🇨🇳China fishfree

@jurgenhaas Thank you! Honestly speaking, I hope the signage protocol is not an open or widely-adpoted protocol or specification. If so, where is the official website? If not, it seems not worth developping such a flexible and extensible module.

🇨🇳China fishfree

@jurgenhaas Thank you for your explanation! It would be much better to write these words in the 'description' of the form elements.

🇨🇳China fishfree

@Knurg Thank you! My oral English is not very fluent. I will prepare my questions and then contact you on chat.wiss-ki.eu. Thank you so much for your lots of help!

🇨🇳China fishfree

@jurgenhaas Thank you for your great work! so flexible! Do you mean we must subscribe to https://signageos.io to get signageOS devices working? Can't we directly working with devices conforming to the signageOS protocol by the module signageOS? In other word, is signageOS protocol even an exclusive and close protocol?

🇨🇳China fishfree

@cyoon84 How did you "try to create a device using 'Custom' platform"? I even cannot find the path to do it.

🇨🇳China fishfree

@Knurg Thank you for your confirmation.
It seems my imported ontology cannot be drilled down to reach a datatype property as the screenshot below. Can I think the ontology is problematic?

I care the semantic conformant storing in Blazegraph much more than the data display in Drupal. This is why I asked this issue here.

🇨🇳China fishfree

On this page /admin/structure/webform/config, there are indeedly the tokens what I want as the screenshot:

🇨🇳China fishfree

@a.kovrigin, Thank you for your confirming. I found I had asked an wrong question. The real question is that no webform and webform-submissions(components) tokens appears in the "Browse tokens" dialog on the page /admin/structure/webform/manage/***/metatags as the screenshot below:

What's wrong with my Drupal 10.2 & Webform 6.2 & Token 8.x-1.13?

Production build 0.69.0 2024