BrandOriented / PimcoreCiHubConnector

This bundle adds full integration between Pimcore and CI-HUB Connector. Now you can add, delete and download all assets, lock and unlock, get all versions for specified asset and much more.
https://brandoriented.io/
Other
5 stars 6 forks source link

List objects - issue #27

Open betterapp opened 4 months ago

betterapp commented 4 months ago

Pimcore version(s) affected

11

Description

I want to list objects in inDesign CI-HUB

I select Object and then refresh image

and I got error message.

Checked server and pimcore logs and we have:

  1. inDesign plugin make such Request to Pimcore:

GET /datahub/rest/test/tree-items?type=object&parentId=1&include_folders=true&size=100&page_cursor=0 HTTP/1.1" 500 3814

  1. In PHP logs I see such error:

[2024-03-05T11:06:34.586600+01:00] pimcore.elasticsearch.ERROR: Retry 0: Invalid URL: scheme is missing in "//_search?track_total_hits=true&rest_total_hits_as_int=true". Did you forget to add "http(s)://"? [] [] [2024-03-05T11:06:34.587351+01:00] request.CRITICAL: Uncaught PHP Exception Symfony\Component\HttpClient\Psr18RequestException: "Invalid URL: scheme is missing in "//_search?track_total_hits=true&rest_total_hits_as_int=true". Did you forget to add "http(s)://"?" at Psr18Client.php line 110 {"exception":"[object] (Symfony\\Component\\HttpClient\\Psr18RequestException(code: 0): Invalid URL: scheme is missing in \"//_search?track_total_hits=true&rest_total_hits_as_int=true\". Did you forget to add \"http(s)://\"? at /var/www/test/www/vendor/symfony/http-client/Psr18Client.php:110)\n[previous exception] [object] (Symfony\\Component\\HttpClient\\Exception\\InvalidArgumentException(code: 0): Invalid URL: scheme is missing in \"//_search?track_total_hits=true&rest_total_hits_as_int=true\". Did you forget to add \"http(s)://\"? at /var/www/test/www/vendor/symfony/http-client/HttpClientTrait.php:565)"} []

How to reproduce

Test it

Possible Solution

No response

Additional Context

No response

labudzinski commented 4 months ago

Make sure you have added object items to the CI Hub Endpoint Configuration. Screenshot 2024-03-06 at 11 58 07

betterapp commented 4 months ago

@labudzinski

Yes we have Product entity added.

betterapp commented 4 months ago

@labudzinski

We see such error during indexing: Error thrown while handling message CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\UpdateIndexElementMessage. Sending for retry #1 using 1000 ms delay. Error: "Handling "CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\UpdateIndexElementMessage" failed: 400 Bad Request: {"error":{"root_cause":[{"type":"document_parsing_exception","reason":"[1:424] object mapping for [data.Photo] tried to parse field [Photo] as object, but found a concrete value"}],"type":"document_parsing_exception","reason":"[1:424] object mapping for [data.Photo] tried to parse field [Photo] as object, but found a concrete value"},"status":400}" ["class" => "CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\UpdateIndexElementMessage","retryCount" => 1,"delay" => 1000,"error" => "Handling "CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\UpdateIndexElementMessage" failed: 400 Bad Request: {"error":{"root_cause":[{"type":"document_parsing_exception","reason":"[1:424] object mapping for [data.Photo] tried to parse field [Photo] as object, but found a concrete value"}],"type":"document_parsing_exception","reason":"[1:424] object mapping for [data.Photo] tried to parse field [Photo] as object, but found a concrete value"},"status":400}","exception" => Symfony\Component\Messenger\Exception\HandlerFailedException^ { …}]

we got Photo field in Product class which is Image type field. And this is why we do not see the objects in inDesign. it is not indexed in ES because of this error