Expand my Community achievements bar.

PDF viewer issue accessed over dispatcher, Works in author and publish

Avatar

Level 2

PDF viewer issue accessed over dispatcher url or end url, Issue empty html tag, but works in author and publish

12 Replies

Avatar

Community Advisor

Hi,

 

Dispatcher might be blocking pdf extension, you can check dispatcher log and see why it is being blocked

 

/var/logs/httpd/access_log

 

Usually dispatcher denies all urls, extensions, we need to add allow list based on the requirements like below under filters.any file

 

/0010 { /type "allow" /extension '(css|eot|gif|ico|jpeg|jpg|js|gif|pdf|png|svg|swf|ttf|woff|woff2|html)' /path '/content/dam/.*' }

Avatar

Level 2

It's already allowed. I don't see the pdf viewer mark up itself

mallipanchal007_0-1649258747193.png

 

Avatar

Employee Advisor

Hi @mallipanchal007 ,

Does it work when you pass a query parameter in the browser url? If so, clear all the cache in the dispatcher and check. If not we can look at other things

Avatar

Level 2

It's not the cache already tried with query param & cleared complete cache.

Avatar

Employee Advisor

The html code you are getting happens when the client ID is not correct. You must be using some domain for your dispatcher, did you register that domain to get a new client ID. For author and publish domain, it will be different and for dispatcher domain it will be different. Check if you are using same clientid that you generated. If so, generate a new one for your dispatcher domain and update, clear cache and re-try.

Avatar

Level 2

I have the clientId created for the dispatcher domain. 

I tried accessing it still the same. I don't see the mark empty.

Avatar

Employee Advisor

I did work on this a year ago and it does work perfectly fine. If you are available, lets jump on a call here meet.google.com/gbf-vimf-rqo

 

Avatar

Level 2

Hi Anish,

 

I found the issue. when I access the page with publisher it can resolve the clientId. But when it was accessed through dispatcher it its not able to resolve the clientId from context-aware config.

weird!! I don't is there something I'm missing.

Avatar

Employee Advisor

Let me set it up today on my local and get back to you.

Avatar

Level 1

@Anish-Sinha I have the same situation here.I am using a nested context-aware structure, to mirror the content structure:

/content/tenant/region/site

/conf/tenant/region/site

I get the following results: on author and publish I get the configs set on /conf/tenant/region/(configs set here ->)site

but on dispatcher I get the configs set on /conf/(configs set here->)tenant

Initially I thought the PdfViewerCaConfig is not supporting nested structuring, but it seems is not the case, as author and publish works fine.

Also, IMO caching is out of discussion, because when I change config values on /conf/tenant the changes are instantly mirrored on dispatcher response.

 

What do you think ?

Avatar

Employee Advisor

please take a look at the documentation below and verify that your dispatcher is configured correctly. [1]

 

Also, please attempt to flush/clear your dispatcher. [2]

 

[1] https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c...

 

[2]  https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/page-invalid...

Avatar

Level 2

We can access the pdf as the link and I tried out taking some snippets of pdf viewer and places in page component as baked in html markup with clientid it worked.