Debugging in the sitemap controller as the it cant display the whole sitemap. The reason is that the loop is broken. The solution is to fix the loop, optimize the codes and test it and it is now working