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.
what skin are you running?
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.
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.
What skin are you using? Elastic does not use the `icon` attribute.
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
What is "the mobile device skin" skin?
The call to `asset_url()` has been their since 1.5. May be the skin is just not compatible with 1.7 but I am interested to see the cause of the eror because your fix will cause the skin to not render properly I guess.
it's the "Mobile Device Skin" by Melanie, long time EOL, would love to get rid of it - but not that easy with some customers ... ^^
(https://i.postimg.cc/wTqD7Kxd/grafik.png)
I cannot find that skin. In the template files if you can find the reference to the "listmenulink" object. Something like:
<roundcube:object name="listmenulink"...
and it should have an attribute called either `optionsmenuicon` or `icon`. If you remove that attribute then the problem should go away.
Hi,
thanks for looking into this and the hint that the Larry skin is not supported anymore.
Accordingly I tried using Elastic and got pretty much the same errors plus an Elastic related one.
PHP Warning: Undefined array key "elastic" in /usr/share/roundcube/plugins/jquery_mobile/jquery_mobile.php on line 44
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
PHP Warning: Undefined array key "elastic" in /usr/share/roundcube/plugins/jquery_mobile/jquery_mobile.php on line 44