The option to create a floor was broken for a long time, because it
relied on the presence of a Diffuse BSDF in a new material, however it
has been replaced by the Principled BSDF long ago.
Additionally, use the data API to create the modifiers instead of the
ops API, and assign nodes to variables instead of getting them by
name, which will not work any more if the UI is translated.