1

We have recently upgraded one of our client's environment from SDL Tridion 2011 SP1 to SDL Web 8.1. When we are publishing any DCP its content is getting stored as junk characters in the Database table, due to which querying OData is resulting in junk characters.

Any suggestions/guidance will be really helpful.

Adding further to the above question: When I query content using Content.svc I get the data in the correct format but when I query same using Odata.svc (Odata comes from an old SDL Tridion 2011 SP1 setup), I get junk characters.

Regards

1

I would like to point that content in Broker database is always encoded and it's correctly set as such. Since your Content.svc is returning properly decoded data, it means that problem is not in Content.svc service, but in legacy Odata.svc. From your question I guess your system is 8.5, so my question to you is why are you still using Odata.svc extension point? You can see the changes in naming in following article.

As additional note, you can use following query to get component presentation from broker database in decoded format.

SELECT CONVERT(varchar(max), CONVERT(varbinary(max), CONTENT))
FROM COMPONENT_PRESENTATIONS
WHERE (PUBLICATION_ID = 118)
AND (COMPONENT_ID = 222) 
AND (TEMPLATE_ID = 333333)
  • Thanks, same solution we have concluded during our different troubleshooting sessions. Your answer adds weight to our findings. Although our client wanted to stick with odata instead of content service, which we resolved using url rewrite. Thanks again. – user2166 Dec 10 '18 at 13:17
  • heheheh creative solution i must add. :D – Marko Milic Dec 10 '18 at 13:40
0

Seems to be an encoding issue, do the following in your deployer service.

  1. Uninstall your deployer service
  2. Go to your deployer service \bin folder and open to edit the installService.ps1 file to add -Dfile.encoding=UTF8 in the $jvmoptions

    $jvmoptions = "-Xrs", "-Xms256m", "-Xmx256m","-Dfile.encoding=UTF8"

  3. Also, To use the jvm.xml in your Content Delivery deployer service config folder to enable encoding

    <Option Name="-Dfile.encoding" Value="UTF-8"/>

  4. ReInstall your deployer service with installService.ps1

  5. Republish your DCP to check your database

I hope it helps to fix this encoding issue.

  • I am checking will update soon. – user2166 Sep 26 '18 at 7:38
  • I tried above suggestion, but unluckily it didn't work. Further my concern is in-spite of junk characters in Database table, Content.svc is able to read same content and show properly but OData.svc is not, something need to be configured differently for Odata service. Please let me know. – user2166 Sep 26 '18 at 9:29
  • Found something, which I am exploring tridion.stackexchange.com/questions/2967/… – user2166 Sep 26 '18 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.