juanluisbaptiste / docker-otrs

The unofficial Znuny/OTRS Ticketing System docker image
https://www.juanbaptiste.tech/category/otrs
GNU Lesser General Public License v3.0
175 stars 104 forks source link

Login button disabled after minor version upgrade. #86

Closed juanluisbaptiste closed 4 years ago

juanluisbaptiste commented 4 years ago

Image and OTRS versions

latest, 6.0.27

Describe the issue

Upgrading a minor version can sometimes disable the login button. This seems to be fixed by running the database upgrade script:

su -c "/opt/otrs/scripts/DBUpdate-to-6.pl --non-interactive" -s /bin/bash otrs

Working on a fix right now.

juanluisbaptiste commented 4 years ago

Fixed by saving the current running version in /opt/otrs/Kernel/current_version and comparing it against OTRS_VERSION env var (set at build time in the Dockerfile) to know if we are running a new version and a minor version upgrade is needed.

As 6.0.27 is the first version with this fix, if upgrading from an earlier version you will have to connect to the container and manually do the upgrade by running the following command:

su -c "${OTRS_ROOT}/scripts/DBUpdate-to-6.pl --non-interactive" -s /bin/bash otrs

perler commented 4 years ago

running the script manually is not working, at least not when upgrading from 6.022 to 6.029 it throws

Can't locate Kernel/System/Console/Command/Dev/Code/CPANAudit.pm

juanluisbaptiste commented 4 years ago

Hi @perler , I just tested an upgrade from a new 6.0.22 install to 6.0.29 and the mentioned command on this comment fixes the login issue. I also tested with one of my systems that was on 6.0.23 and it worked too, no errors so your install must have something different.

perler commented 4 years ago

thanks, but could your test for the existence of CPANAudit.pm and install it if neccessary?

I don't know when this routine has been introduced into the OTRS updater and (in typical OTRS style) does nothing, no matter the result of the CPAN audit, it always returns 1 - but it fails and stops the whole update when CPANAudit.pm is not installed.

juanluisbaptiste commented 4 years ago

Hi @perler , the file does exists before and after the update:

# find / -name CPANAudit.pm
/opt/otrs/Kernel/System/Console/Command/Dev/Code/CPANAudit.pm
perler commented 4 years ago

problem ist, not in this installation here. I think we came from OTRS 5 and upgraded. so this might be the reason [root@a3ebe55ff399 /]# find . -name CPANAudit.pm [root@a3ebe55ff399 /]#

Sebastian-Roth commented 1 year ago

Sorry for bringing up this old topic again. Just done a major upgrade from 5.0.16 to 6.0.38. The login button is disabled and running the DBUpdate-to-6.pl as mentioned above does not fix the issue for me. Clear all the caches as well. The file /opt/otrs/Kernel/System/Console/Command/Dev/Code/CPANAudit.pm does exist.

Anyone got a hint on what actually causes the button to be disabled? Even if I use browser developer tools to remove the disabled I am not able to send the form and login to OTRS.