Problem/Motivation

When I start Cron manually I get a WSOD with the following warning:

The website encountered an unexpected error. Please try again later.
Error: Call to a member function getMimeType() on null in Drupal\pdf\Plugin\Field\FieldFormatter\PdfDefault->viewElements() (line 168 of modules/contrib/pdf/src/Plugin/Field/FieldFormatter/PdfDefault.php).

Steps to reproduce

Upgraded site from D7 to D9

I Guess there is some data missing in the database but can not figure out what it is exactly.

Otherwise it seems that the module PDF is working fine but it bothers me that I get a WSOD when I run Cron Manually!

Is there a fix or workaround?

CommentFileSizeAuthor
#4 php-error-fix-3252741.patch1.16 KBzubair-rana

Comments

bart lambert created an issue. See original summary.

bart lambert’s picture

Hi,

I resolved this problem by uninstalling and reinstalling the pdf module.
This solved the problem (for now?)

shenzhuxi’s picture

Version: 8.x-1.1 » 8.x-1.x-dev
Assigned: Unassigned » shenzhuxi
Status: Active » Closed (outdated)
zubair-rana’s picture

StatusFileSize
new1.16 KB

Here is a ptch to fix the error.