If you are seeing a "def" error message next to the extruder and/or bed temperature indicators on your LCD screen then you most likely have a thermistor problem. The thermistor is what allows the extruder and also the heated build plate to operate at a certain temperature.
Thermistor basics in 3D printing: Your heating core (what transmits heat to the heating block) is "dumb" in a way because it is not able to regulate how much heat it provides by itself. In order to regulate heat there must be a sensor that accurately reads the temperature of the heating block and then relays that data to the micro-controller which effectively allows more or less power (heat) to be transmitted by the heating core. The heating core heats the heating block which in turns provides the heat necessary to melt your filament as it passes through your extruder. If there is an interruption of data sensing by the thermistor either at the thermistor itself or somewhere along the thermistor cable then the micro-controller will not be able to reliably control how much heat is being provided to your heating block.
Basic Heat Regulation Cycle: Micro-controller (reads data) > Thermistor Cable (relays data) > Thermistor (exhibits power resistance depending on temp) > Heating Block (stores heat) > Heating Core (transmits energy/heat) > Micro-controller (allows the passage of energy based on read data)
Why are you getting the "def" error?: You have a bad/cut/melted/frayed/disconnected thermistor and/or thermistor cable. To find the problem spot you will need to inspect the thermistor and the thermistor cable carefully for anything that resembles a problem. The usual problem spot is at the point of contact with the heating block. This is due to the amount of heat that is generated from the heating block and also because there is pressure on the thermistor cable by the screw and nut set. Also be sure to check for a loose cable connector at the mainboard (micro-controller) as these are known to un-plug out of place.
On your Duplicator i3 the thermistor cables (there are 2 of them) are pointed out by the yellow arrows below. These will run from your micro-controller all the way through to your heating block. They are attached to your heating block by a washer and screw set indicated below by the pink arrow:
The Solution: Once a thermistor is malfunctioning it should be replaced. However, if the problem is a cut or disconnection somewhere along the cable it can be repaired/re-connected. If you have never repaired a wire it is crucial that you ask us for help by contacting us at email@example.com since this wire is what will regulate how much heat is transmitted to your extruder assembly (possibly very dangerous). If you have connected wire before then the procedure is standard: create 2 clean cut ends, pull back cable sheathing exposing the metal wire ends, take one of the ends and slide on heatshrink tube all the way past the point that will be soldered, solder both new wire ends to each other, slide heatshrink back over the solder point, shrink heatshrink, and lastly wrap in kapton tape for extra safety.
Heated Bed Plate Thermistor
The thermistor on the HBP follows the same principle as the one found at the extruder assembly. In order to view or inspect the thermistor on the HBP you will need to unscrew the four leveling wingnuts on your HBP and flip over the top aluminum build surface. The thermistor is shown below by the green arrow: