Hello!
My error log was empty during the last days... ;) I think, now I know the reason:
A few days ago I deleted a post icon, wich I had uploaded in themes/default /images/post. This icon was shown in the first post of a topic and in the board, but not in "action=unread".
All the errors I had in forum were just about this icon, as I believe now. Every time if someone was going to read or to write in this topic or was collapsing the category with this topic, there was an error in the log.
Today - after the patch - I have tried to upload this post icon again. First again in themes/default/images/post, and the same errors in forum were shown. Then I tried themes/mytheme /images/post, but it was not possible to manage this icon in ACP - custom post icons must always be in default, as I believe?
What is the error exactly? (It may be worth a fix. ;))
You can manage icons in the admin panel only if they are in the default theme, but then you need a copy of the same icon in your theme.
In other words you need the icons in any theme you have.
I didn't know, that the post icons must be uploaded in
both files, emanuele... :-[
(I hope that smileys will work in my theme, if they are only in default? We have got thousands of smileys.)I have tried to upload this post icon again, now it is in both files and I could manage it in the admin panel, without an error.
But it is still not displayed in "action recent". There are a lot of errors in the log, they all look like this:
The same error is shown on line 1054, 1038, 1020
It may be I just said something stupid looking at the wrong code, but I can't check again.
Smiley are not even in the themes directory. ;)
I'll check it.
There are the same errors if the forum is in default and I don't use my theme.
How "serious" are those errors about the icons, emanuele? Can I ignore them?
I can manage this icons if I upload them in both files and those icons are shown everywhere in forum and portal - they are just not displayed in action=unread and in action=unreadreplies. I think, nobody will notice this - except me. ;)
Errors can always be ignored. :P
They are annoying, though.
I think it is a bug.
In Recent.controller.php, find:
// We need to check the topic icons exist... you can never be too sure!
if (!empty($modSettings['messageIconChecks_enable']))
{
// First icon first... as you'd expect.
if (!isset($context['icon_sources'][$row['first_icon']]))
$context['icon_sources'][$row['first_icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['first_icon'] . '.png') ? 'images_url' : 'default_images_url';
// Last icon... last... duh.
if (!isset($context['icon_sources'][$row['last_icon']]))
$context['icon_sources'][$row['last_icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['last_icon'] . '.png') ? 'images_url' : 'default_images_url';
}
and add immediately after:
else
{
if (!isset($context['icon_sources'][$row['first_icon']]))
$context['icon_sources'][$row['first_icon']] = 'images_url';
if (!isset($context['icon_sources'][$row['last_icon']]))
$context['icon_sources'][$row['last_icon']] = 'images_url';
}
It should do the trick.
If it works, please let us know, so that it can be pushed to 1.0.2. ;)
Thank you very much, emanuele... :) It works perfect...no errors in the log and the icons are now everywhere to see.
But they must be uploaded in both post-files.
Tracked:
https://github.com/elkarte/Elkarte/issues/1862
Yes, there is an hidden setting if you
really want to have them only in one, but in general it's good habit to have images in each theme. ;)
Fix pushed: https://github.com/emanuele45/Dialogo/commit/a1822d46d628f4278acbd602c822dbd01187c8bf
Moving the topic while I have it on the radar.