pierre-alain-b / rainloop-nextcloud

Rainloop plugin for Nextcloud
110 stars 37 forks source link

After Update to 7.2.2 blank page in Mailer and Adminpanel #274

Closed alabre closed 2 years ago

alabre commented 2 years ago

Hi there,

it seems as if a zombie bug came back. When I switch to nextcloud app or admin panel I get a blank screen and no error messages in the logs.

I have found the discussions about issue #201 and #210 regarding this issue. The error message are quite the same as in #201 (wrong MIME type) and I have no clue how to fix the issue by myself, as the suggested fixes were for nginx.

I am on Archlinux with Nextcloud 23.0.3, PHP 8.1, Apache where nextcloud and packaged apps are in /usr/share/webapps/nextcloud/ with a writable "wapps" "directory" that links to /var/lib/nextcloud/apps/ and corresponding configuration files for php and nextcloud. This is the setup suggested and requested in archlinux' wiki.

Before the last updates that came in last week, everything was working perfectly fine.

If I can support you with more information from my browser console I will do that, logfiles are all empty concerning this issue.

All the best and thank you for this great nextcloud mail client. Cheers, Achim

linuxrrze commented 2 years ago

Same here, only thing that's different: I'm still using php 7.4.

No traces concerning this problem are noted in the logs.

pierre-alain-b commented 2 years ago

OK thank you for reporting, I will have a look and propose something to test as a fix.

linuxrrze commented 2 years ago

Great - thanks!

tormodvolden commented 2 years ago

Looks like OP's issue here, with https://my-host/apps/rainloop/app/rainloop/v/1.16.0/static/js/min/polyfills.min.js?community getting MIME type text/html (as seen in the Network Monitor in Firefox).

Not sure I understand the logic in https://github.com/pierre-alain-b/rainloop-nextcloud/blob/5944fb3084bb0fc776e6924b479b34ac81dd4d81/app/rainloop/v/1.16.0/app/libraries/RainLoop/Utils.php#L585-L586 but if you're not on Owncloud, the $sAppPath will be empty? I changed return $sAppPath to return str_replace("/apps/rainloop/app", "/wapps/rainloop/app", $sAppPath); just to get it working again.

pierre-alain-b commented 2 years ago

Hello there,

Could anyone try to change the content of the WebPath function in app/rainloop/v/1.16.0/app/libraries/RainLoop/Utils.php and test if this fixes the issue? I don't have an instance to replicate the problem...

    public static function WebPath()
    {
        $sAppPath = '';
        if (\RainLoop\Utils::IsOwnCloud())
        {
            if (\class_exists('OC_App'))
            {
                $sAppPath = \rtrim(\trim(\OC_App::getAppWebPath('rainloop')), '\\/').'/app/';
            }

            if (empty($sAppPath))
            {
                $sUrl = \MailSo\Base\Http::SingletonInstance()->GetUrl();
                if ($sUrl && \preg_match('/\/index\.php\/apps\/rainloop/', $sUrl))
                {
                    $sAppPath = \preg_replace('/\/index\.php\/apps\/rainloop.+$/',
                        '/apps/rainloop/app/', $sUrl);
                }
            }
        }

        return $sAppPath;
    }
alabre commented 2 years ago

@pierre-alain-b Just tested your code from above. It's WORKING! :-)

pierre-alain-b commented 2 years ago

Ok great, I will ship a new version, thank you so much for taking the time to test!

alabre commented 2 years ago

Thank you for "blindly" fixing it! :-)

pierre-alain-b commented 2 years ago

7.2.3 just released and pushed to the Nextcloud Apps repository.

joergmschulz commented 2 years ago

big thank you. Can confirm it works here as well.

tormodvolden commented 2 years ago

Thanks a lot! 7.2.3 works fine here also.