Why getting “The input type is invalid” when accessing edit.php?

Ok I’m not sure this will fix your issue, but your error in your log (especially the file where it is called from) tells me it’s a query vars issue likely from a bad regex or a bad routing of the request in your nginx config.

replace your line

fastcgi_split_path_info ^(/blog)(/.*)$;

with

fastcgi_split_path_info ^(.+\.php)(/.+)$;

and replace (this one I’m not sure it’s required, but you could try it too)

fastcgi_param  SCRIPT_FILENAME  $request_filename;

with

fastcgi_param  SCRIPT_FILENAME  $document_root$request_filename;