Exporting pdf causes a "Trying to get property 'name' of non-object" #2238

Closed
opened 2026-02-05 03:25:17 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @martijndegouw on GitHub (May 5, 2021).

Describe the bug
Exporting a PDF fails with the following error (when debug is enabled):
Trying to get property 'name' of non-object (View: /srv/www/bookstack/v21.04/resources/views/partials/entity-export-meta.blade.php)

Steps To Reproduce
I've got the feeling this is caused by the original creator of the page being removed from bookstack, since the revision page of the page shows a lot of 'Deleted User', including the Initial publish.

Expected behavior
I expect that the pdf export still works

Screenshots
image

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v21.04
  • PHP Version: PHP 7.3.27-1~deb10u1
  • Hosting Method (Nginx/Apache/Docker): Apache

Additional context
I removed line 8 from entity-export-meta.blade.php and the export works as expected.

Originally created by @martijndegouw on GitHub (May 5, 2021). **Describe the bug** Exporting a PDF fails with the following error (when debug is enabled): Trying to get property 'name' of non-object (View: /srv/www/bookstack/v21.04/resources/views/partials/entity-export-meta.blade.php) **Steps To Reproduce** I've got the feeling this is caused by the original creator of the page being removed from bookstack, since the revision page of the page shows a lot of 'Deleted User', including the Initial publish. **Expected behavior** I expect that the pdf export still works **Screenshots** ![image](https://user-images.githubusercontent.com/3339604/117161485-3aff4280-adc2-11eb-8d54-f948c9a1dabd.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v21.04 - PHP Version: PHP 7.3.27-1~deb10u1 - Hosting Method (Nginx/Apache/Docker): Apache **Additional context** I removed line 8 from entity-export-meta.blade.php and the export works as expected.
OVERLORD added the 🐛 Bug🏭 Back-End🚚 Export System labels 2026-02-05 03:25:17 +03:00
Author
Owner

@ssddanbrown commented on GitHub (May 6, 2021):

Thanks for reporting @martijndegouw with the clear provided details. I've patched this up in a083ceaf44 with some testing to cover, This will be included in the next patch release.

@ssddanbrown commented on GitHub (May 6, 2021): Thanks for reporting @martijndegouw with the clear provided details. I've patched this up in a083ceaf44b87cf6a4062d6ed8f01eb75b6a5f43 with some testing to cover, This will be included in the next patch release.
Author
Owner

@martijndegouw commented on GitHub (May 6, 2021):

I tried your patch on our instance and can confirm the export to pdf works as expected now 👍

@martijndegouw commented on GitHub (May 6, 2021): I tried your patch on our instance and can confirm the export to pdf works as expected now :+1:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2238