137
Views
10
Comments
[Ultimate PDF] Error PDF output when using URL without Module name (SEO URL)
ultimate-pdf
Reactive icon
Forge asset by Leonardo Fernandes
Application Type
Reactive

Hi, we are using Utimate PDF with enterprise env. 

Everything good with all environments (dev, staging, prod) that using default URL like that https://server.com/module/ActionPDF?xxx

But after using SEO URL like this https://myapp.server.com/ActionPDF?xxx . Then, the component throw error and cannot export file.

I'm not sure how to config or change any setting for mapping with the URL without module name.

Please help.

Thanks

Phuoc Tri

UserImage.jpg
Harry Shyket

I am hitting the same issue. It looks like inside the module, it specifically requests the module name and screen name:

    var location = window.UltimatePDF.runtime.getLocation();
    var paths = location.pathname.substr(1).split("/");
    $parameters.Module = paths[0];
    $parameters.Screen = paths[1];
    if (location.search) {    $parameters.QueryParameters = location.search.substr(1);}

I even tried to do a custom URL so that instead of /ActionPDF, it would be /MyPage/ActionPDF, but it printed the screen instead of rendering the page that I had created.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi. This is indeed not working at the moment.

As a workaround, don't use the ScreenToPDF block, and instead of navigating to the report screen, you can call a server action that executes the PrintToPDF action with the URL of the report screen. Make sure you choose a suitable timeout value for this server action.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

This issue has been fixed in version 9.0.5.

2019-11-21 08-09-54
Phuoc Tri

Thanks for your solution. 

But the workaround solution not work. So, we are planning to upgrade this component 9.0.0 to version 9.0.5 . 

Regards,

UserImage.jpg
Harry Shyket

Another, albeit not great, workaround is to use JavaScript (due to a know issue with Reactive web redirects). You reformat the URL with <hostname>/<modulename>/<pdfscreen>?<parameters> and have JavaScript either replace the URL or open a new tab. Not sure on the 9.0.5 compatibility though.

2019-11-21 08-09-54
Phuoc Tri

Hi, thank for your reply.

Because our pdf page required loged in. And after I tested this, it will be redirect to login page.

Because  https://<modulename>.company.com/<screenname>  and https://www.company.com/<modulename>/<screenname>  are 2 diff. site.

Regards,

2019-11-21 08-09-54
Phuoc Tri

Hi, it's me again. 


After we upgrade to 9.0.5 but no luck, it's another error on SEO URL (the default URL still good)

https://<modulename>.company.com/<screenname>?param: Could not locate deployment zone based on module name: <screenname>"

So, component still thinking that our <screenname> is module.

Could you please check this.


Regards,

TriDP

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Phouc.

Are you using ScreenToPDF block, then navigating to the screen from your application? I tested that scenario before I released version 9.0.5.

Could you try using the URL https://<modulename>.company.com/<modulename>/<screenname> so that it will keep using the same site?

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Phouc.

Version 10 should improve the support for SEO URLs. I would recommend you testing with this new version and letting me know if that works.

2019-11-21 08-09-54
Phuoc Tri

Thank for your reply, I will try to test this. I will inform if ok or not.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.