justingit / dada-mail

Self-Hosted, Full Featured, Email Mailing List Manager. Announcement + Discussion Lists, Web-based Installer, Installs with minimal dependencies, sendmail/SMTP/Amazon SES supported
https://dadamailproject.com
GNU General Public License v2.0
169 stars 40 forks source link

Upgrade problem from 11.9.0 to 11.21.0 #1174

Open TheOtterslider opened 11 months ago

TheOtterslider commented 11 months ago

I've got a working install of 11.9 that I'm trying to upgrade to 11.21.0 (current).

When I start the upgrade process, the page loses all styling and won't go past the "install or upgrade" page.

If I run the command line upgrade, the upgrade works, but when I visit the login page, again there's no styling present.

If I do a "clean" install of dada (remove the .dada_files directory, clean everything), I get the exact same problem when I visit the first installer page...all styling is gone.

I monkeyed around following the advanced instructions (basically unzip the tar file, remove the installer directory, copy my Config.pm file over, use the original .dada_files files), I get something similar to the command line upgrade. I get a working installation, but all styling is broken.

I think it has to do with the URLs in use. My current install uses URLs like mail.cgi?flavor=admin while the new install and upgrade wants to use things like mail.cgi/admin. I think this is caused by the change back in 11.19 to ship a perl with data. My guess is my hosting provider isn't liking that.

The docs have a note that says "We've made it easy to switch to this alternative Perl interpreter located. Do note, that there's no way to revert to the default Perl interpreter location. You would need to either reinstall Dada Mail from scratch, or manually reset the "shebang lines" yourself." I haven't checked everything, but the mail.cgi file but it looked like the shebang line was right.

Anyone have any ideas?

justingit commented 11 months ago

Are you accessing the installer via http, rather than https?

On Oct 14, 2023, at 4:07 AM, TheOtterslider @.***> wrote:

I've got a working install of 11.9 that I'm trying to upgrade to 11.21.0 (current).

When I start the upgrade process, the page loses all styling and won't go past the "install or upgrade" page.

If I run the command line upgrade, the upgrade works, but when I visit the login page, again there's no styling present.

If I do a "clean" install of dada (remove the .dada_files directory, clean everything), I get the exact same problem when I visit the first installer page...all styling is gone.

I monkeyed around following the advanced instructions (basically unzip the tar file, remove the installer directory, copy my Config.pm file over, use the original .dada_files files), I get something similar to the command line upgrade. I get a working installation, but all styling is broken.

I think it has to do with the URLs in use. My current install uses URLs like mail.cgi?flavor=admin while the new install and upgrade wants to use things like mail.cgi/admin. I think this is caused by the change back in 11.19 to ship a perl with data. My guess is my hosting provider isn't liking that.

The docs have a note that says "We've made it easy to switch to this alternative Perl interpreter located. Do note, that there's no way to revert to the default Perl interpreter location. You would need to either reinstall Dada Mail from scratch, or manually reset the "shebang lines" yourself." I haven't checked everything, but the mail.cgi file but it looked like the shebang line was right.

Anyone have any ideas?

— Reply to this email directly, view it on GitHub https://github.com/justingit/dada-mail/issues/1174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAJWO5MFN67WKS4AC374CLX7JP7NANCNFSM6AAAAAA6AEZHGQ. You are receiving this because you are subscribed to this thread.

TheOtterslider commented 11 months ago

Are you accessing the installer via http, rather than https? https

That question made me think....I should look at the logs.

In there I see entries like:

GET /?flavor=screen&screen=/static/javascripts/vendor/foundation/foundation.topbar.js?v=v11.22.0%20stable%202023-09-18
"GET /?flavor=screen&screen=/static/css/vendor/foundation/app.css?v=v11.22.0%20stable%202023-09-18

Those appear to return 403 errors. I imagine this has something to do with a config I've got somewhere for perl and cgi. The wevbserver doesn't know what to do with no cgi script in there......

Edit....this got me wondering about the .htaccess file that may/may not exist. I've confirmed the default dada .htaccess file is in the dada/ (yes, the lowercase one) directory. I'm not an expert, but the contents look like the above lines should would

DirectoryIndex mail.cgi index.php index.html

# We do not need the RewriteEngine on,
# and sometimes enabling it mucks up Dada Mail functioning:
<IfModule mod_rewrite.c>
    RewriteEngine Off
</IfModule>
justingit commented 11 months ago

Find these lines in,

dada/installer/lib/DadaMailInstaller.pm:

sub setup {

    my $self = shift;

    $Self_URL = $self->self_url();

Here's some context: https://github.com/justingit/dada-mail/blob/2818ac480be455acc5d7909024c4f80969159582/app/dada/installer-disabled/lib/DadaMailInstaller.pm#L280C1-L281C35 And try changing, '$self->self_url();' to the URL of where the install.cgi is accessed (like this:)

sub setup {

    my $self = shift;

    $Self_URL = 'https://example.com/cgi-bin/dada/installer/install.cgi';