Hello, first of all thanks for this message because it has been helpful to me. I have used the attached file to replace the PdfThumbnail.php file in order to be able to link the content from the canvas image. I was getting an error because apparently the render() call used is not working on Drupal anymore, but I was able to fix it. I'm attaching here the file with the fixed piece of code in case somebody wants to use it.
I just have a problem that I don't know if can be fixed on the code or requires of me to do something else. Using the attached file I get the link to the content properly, but I'm using PathAuto module to generate custom paths for every page. When I use this file attached here the generated link to the content is linking to the path without the generated path, so it's something like
mywebsite.com/node/15/ but the real link of the content is the one with the auto generated path, so it should be mywebsite.com/my-content-page.
Does somebody know if there is a way for me to modify the code so that instead of the code with the "node/15" url it will be linking to the code that is generated by pathauto, so that it would be "my-content-page"? I don't know if that's something easy to do within the code or I should use some external module to somehow convert these links. I have been trying to change the code and looking for other options but I didn't find anything that works. If somebody could help me with this I would appreciate.Attached is the modified file from #1 that is working properly right now in Drupal 10.
Thank you
- Assigned to ushma
- 🇮🇳India ushma
I have created a patch using the attched text file and also fixed the url issue. It will now show node alias instead of drupal internal path. Please verify this.
- Status changed to Needs review
11 months ago 10:48am 1 February 2024 - Issue was unassigned.