While it is true that a number of criminals have been enshrined at the Yasukuni Shrine in Japan, and because of this some believe government officials should not visit the shrine because it makes it look as though the government is condoning the criminal actions of the few criminals who are buried there, these men and women died serving their country and just because a few criminals have been buried there is no reason for government dignitaries to ignore the honored dead who are buried there.
No, it is not acceptable for Japan's prime minister and officials to visit the Yasunuki warrior shrine, because their doing so sends a message to the people that Japan tolerates the countless people who died at the hands of inhumane Japanese warriors. Because the issue is so controversial, it would be better if the officials just showed their respect by not visiting the memorials.
Japanese president Abe visited the warrior shrine, devastating countries because it means he is in favor of Japans earlier mistakes and wants them to happen again. China, US, Korea, and many other countries are cutting relationships with Japan because they are very displeased of Japan's recent actions. Also, the soldiers were either forced or persuaded by religion, so if Japan didn't have a religion, then they would not have invaded china.