Index: typo3_src/t3lib/class.t3lib_extmgm.php =================================================================== --- typo3_src/t3lib/class.t3lib_extmgm.php (revision 10121) +++ typo3_src/t3lib/class.t3lib_extmgm.php (revision ) @@ -705,17 +705,24 @@ case 'after': case 'before': $pointer = 0; + $found = FALSE; foreach ($mods as $k => $m) { if (!strcmp($m, $modRef)) { $pointer = strtolower($place) == 'after' ? $k + 1 : $k; + $found = TRUE; } } + if ($found) { - array_splice( - $mods, // The modules array - $pointer, // To insert one position from the end of the list - 0, // Don't remove any items, just insert - $sub // Module to insert - ); + array_splice( + $mods, // The modules array + $pointer, // To insert one position from the end of the list + 0, // Don't remove any items, just insert + $sub // Module to insert + ); + } else { + // If requested module is not found: Add at the end + array_push($mods, $sub); + } break; default: if (strtolower($place) == 'top') {