Roundcube Community Forum

 

Roundcube Mobile: uncaught error

Started by dilbert77, February 20, 2026, 06:33:53 AM

Previous topic - Next topic

dilbert77

When running Roundcube in Firefox on a mobile Android device and navigating to any folders, this error is thrown:

PHP Fatal error:  Uncaught Error: Call to undefined method rcmail_output_json::asset_url() in /usr/share/roundcube/program/actions/mail/index.php:733
Stack trace:
#0 /usr/share/roundcube/program/actions/mail/index.php(644): rcmail_action_mail_index::options_menu_link()
#1 /usr/share/roundcube/program/actions/mail/index.php(478): rcmail_action_mail_index::message_list_head()
#2 /usr/share/roundcube/program/actions/mail/list.php(125): rcmail_action_mail_index::js_message_list()
#3 /usr/share/roundcube/program/include/rcmail.php(282): rcmail_action_mail_list->run()
#4 /usr/share/roundcube/index.php(278): rcmail->action_handler()
#5 {main}
  thrown in /usr/share/roundcube/program/actions/mail/index.php on line 733

Roundcube version: 1.6.12

I already searched in Roundcube forums, but found nothing comparable.

Any thoughts are much appreciated.




JohnDoh

Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Hellkeeper

We can confirm we're seeing the same fatal errors in our logs as well since updating to the latest 1.7 RC4.

Unfortunately we don't know what exactly triggers it. I haven't been able to reproduce the issue myself so far — it only seems to be triggered somehow by our customers in real usage.

Hellkeeper

#3
Quick update: we managed to stop the fatal error from appearing in our logs with a small workaround.

In `program/actions/mail/index.php` (around line 740) we wrapped the `asset_url()` call with a `method_exists()` check, so it won't crash if `asset_url()` isn't available in that context:

diff
--- a/program/actions/mail/index.php
+++ b/program/actions/mail/index.php
@@ -737,7 +737,11 @@
-   $inner = html::img(['src' => $rcmail->output->asset_url($attrib['icon'], true), 'alt' => $title]);
+   $inner = html::img(['src' => (method_exists($rcmail->output, 'asset_url') ? $rcmail->output->asset_url($attrib['icon'], true) : ''), 'alt' => $title]);

After applying this, `Call to undefined method rcmail_output_json::asset_url()` no longer shows up in our logs.

JohnDoh

What skin are you using? Elastic does not use the `icon` attribute.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Hellkeeper

Quote from: JohnDoh on February 27, 2026, 09:28:02 AMWhat skin are you using? Elastic does not use the `icon` attribute.

Hi,

thanks for the hint regarding the skin/theme question.

In our setup we currently run the default Elastic skin, but in parallel we still offer Larry + the mobile device skin for a small group of older users who struggle with bigger GUI changes. We're fully aware that Larry/mobile is not supported anymore with the newer Roundcube versions, however we have adjusted the templates so they work again with 1.7.

Most likely this old TPL is also what triggers the issue (`rcmail_output_json::asset_url()` not being available in that context).

That said, I personally prefer to have core code hardened in a way that even if a template/plugin/theme does something unexpected, it doesn't result in a fatal error. The small guard using `method_exists()` seems like a safe improvement and shouldn't have any downsides — so maybe it could be considered for inclusion upstream.

Best regards,
Andy