Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend-Icons in Listenansicht verschwunden #765

Closed
Hauge opened this issue Feb 27, 2015 · 24 comments
Closed

Backend-Icons in Listenansicht verschwunden #765

Hauge opened this issue Feb 27, 2015 · 24 comments
Assignees
Labels
backend This seems to be a bug in the backend bug A bug! A bug! Fast, squish it! testing This ticket is reported to be fixed by a developer and should be tested.
Milestone

Comments

@Hauge
Copy link

Hauge commented Feb 27, 2015

contao 3.4.4
In der Backend-Ansicht sind "Über Nacht" ohne Update die Icons in der Listenansicht verschwunden.
be-icons

Hatte die MM's gestern angelegt und es wurde alles korrekt angezeigt.
Bin mir nicht sicher, ob es hiermit: #559 einen Zusammenhang gibt.

Name                                             Version                 Last modification
============================================================================================
http://c-c-a.org/
contao-community-alliance/dc-general             dev-develop @ 028271    2015-02-12 19:16:47
contao-community-alliance/dependency-container   dev-develop @ 47f03a    2015-02-05 17:53:34
contao-community-alliance/event-dispatcher       dev-develop @ d2da54    2014-11-28 14:49:59
contao-community-alliance/events-contao-bindings dev-contao-3.2 @ 36eee0 2014-11-08 18:39:45
contao-community-alliance/translator             dev-develop @ 02feca    2014-06-05 08:57:37
--------------------------------------------------------------------------------------------

http://bit3.de
contao-community-alliance/meta-palettes          dev-master @ 13117d     2015-01-26 17:37:38
--------------------------------------------------------------------------------------------

https://www.cyberspectrum.de
discordier/justtextwidgets                       0.5.4                   2014-02-05 22:52:54
--------------------------------------------------------------------------------------------

http://www.doctrine-project.org
doctrine/cache                                   dev-master @ 6c5c32     2015-02-16 12:24:01
--------------------------------------------------------------------------------------------

http://www.leo-unglaub.net
leounglaub/contao-simple-ajax                    1.0.2                   2014-02-07 22:35:55
--------------------------------------------------------------------------------------------

http://www.men-at-work.de
menatwork/contao-multicolumnwizard               dev-dev @ ae91b5        2014-11-20 11:57:11
--------------------------------------------------------------------------------------------

http://now.metamodel.me/
metamodels/attribute_alias                       dev-tng @ 8ceb31        2015-01-29 17:36:33
metamodels/attribute_checkbox                    dev-tng @ e8cd5c        2015-01-30 09:07:10
metamodels/attribute_combinedvalues              dev-tng @ c1aac3        2015-01-28 20:25:15
metamodels/attribute_country                     dev-tng @ b7bb7f        2015-01-29 18:01:21
metamodels/attribute_decimal                     dev-tng @ 439c58        2015-01-29 18:04:31
metamodels/attribute_file                        dev-tng @ 321f63        2015-02-03 17:23:23
metamodels/attribute_langcode                    dev-tng @ 133458        2015-01-29 20:13:11
metamodels/attribute_longtext                    dev-tng @ c9e7d2        2015-01-29 20:59:06
metamodels/attribute_numeric                     dev-tng @ bec96d        2015-01-29 21:43:58
metamodels/attribute_rating                      dev-tng @ 741381        2015-01-30 00:22:15
metamodels/attribute_select                      dev-tng @ 64bc1b        2015-01-31 15:57:04
metamodels/attribute_tabletext                   dev-tng @ 212e4c        2015-02-02 11:06:58
metamodels/attribute_tags                        dev-tng @ eb27e4        2015-02-17 00:04:26
metamodels/attribute_text                        dev-tng @ 3023cd        2015-01-30 05:34:20
metamodels/attribute_timestamp                   dev-tng @ f276dd        2015-02-04 17:49:20
metamodels/attribute_translatedalias             dev-tng @ 3f68cd        2015-01-30 06:35:53
metamodels/attribute_translatedcheckbox          dev-tng @ 3813e4        2015-01-30 09:30:26
metamodels/attribute_translatedcombinedvalues    dev-tng @ 310be8        2015-02-03 17:59:19
metamodels/attribute_translatedfile              dev-tng @ 26b658        2015-02-03 19:25:25
metamodels/attribute_translatedlongtext          dev-tng @ 52a3b7        2015-02-05 21:51:54
metamodels/attribute_translatedselect            dev-tng @ 575303        2015-02-18 02:05:09
metamodels/attribute_translatedtabletext         dev-tng @ e936db        2015-02-17 18:10:52
metamodels/attribute_translatedtags              dev-tng @ 10ec35        2015-02-18 01:41:47
metamodels/attribute_translatedtext              dev-tng @ 574459        2015-02-17 19:34:56
metamodels/attribute_url                         dev-tng @ 6e4d7b        2015-02-17 21:12:53
metamodels/bundle_all                            dev-master @ f58927     2013-10-01 20:03:31
metamodels/bundle_attributes                     dev-master @ 058e26     2014-02-03 14:19:34
metamodels/bundle_filter                         dev-master @ 45d9cf     2013-05-03 07:16:44
metamodels/bundle_nontranslated                  dev-master @ 5f2b3f     2014-02-17 14:37:26
metamodels/bundle_translated                     dev-master @ 4bc0c1     2014-02-17 14:34:39
metamodels/core                                  dev-tng @ 6fc29b        2015-02-20 22:02:21
metamodels/filter_checkbox                       dev-tng @ 7d06b8        2015-02-17 21:46:24
metamodels/filter_fromto                         dev-tng @ 7960bd        2015-02-19 20:56:22
metamodels/filter_range                          dev-tng @ e463d0        2015-02-19 21:09:34
metamodels/filter_select                         dev-tng @ 597806        2015-01-10 05:37:20
metamodels/filter_tags                           dev-tng @ 1127e5        2015-02-18 01:59:32
metamodels/filter_text                           dev-tng @ 6df9de        2015-01-13 04:37:56
--------------------------------------------------------------------------------------------

http://pimple.sensiolabs.org
pimple/pimple                                    1.1.x-dev @ bc2fc1      2014-04-20 07:24:09
--------------------------------------------------------------------------------------------

http://symfony.com
symfony/event-dispatcher                         2.7.x-dev @ ce9246      2015-02-18 10:38:04
symfony/expression-language                      2.7.x-dev @ 087927      2015-02-18 10:38:04
--------------------------------------------------------------------------------------------

other
contao-community-alliance/url-builder            dev-develop @ 5f8997    2014-09-20 03:38:06
@Hauge
Copy link
Author

Hauge commented Feb 27, 2015

Das Problem besteht nicht, wenn man den Internen Cache in den Einstellungen umgeht.

@Zeromax
Copy link
Contributor

Zeromax commented Feb 27, 2015

@discordier need a cash label ;)

@discordier
Copy link
Member

Oh fsck.... how can we circumvent this.... :(
We are creating the icons once and pushing the whole config to the MetaModels cache then.
Now Contao has the cache expire time which kills our icons but not our cache file... and we go "white".

@discordier
Copy link
Member

We should put our cached copies into an own images sub directory within the cached assets files which are not getting cleaned by Contao.

@discordier discordier added bug A bug! A bug! Fast, squish it! backend This seems to be a bug in the backend easy pick This issue is a good start for beginners labels Mar 17, 2015
@discordier discordier added this to the 2.0.0 milestone Mar 17, 2015
@zonky2
Copy link
Contributor

zonky2 commented Dec 27, 2015

Um welche Icons geht es hier damit ich das am aktuellen MM testen kann...

@discordier
Copy link
Member

Egal welche. Es geht um die Integration als Kind. Die hierbei erzeugten Operation Buttons landen im Contao Cache und werden dummerweise von Contao gekillt

@zonky2
Copy link
Contributor

zonky2 commented Jan 15, 2016

@discordier was ist daran "easy pick"? was wäre zu tun?

@discordier
Copy link
Member

See my comments above. :)

@zonky2
Copy link
Contributor

zonky2 commented Dec 9, 2016

vllt verstehe ich die Sache nicht richtig aber bei
Contao 3.5.19
MM core a15
DCG b39

  • habe ich zwei MMs, wobei das eine MM eine Kindtabelle ist und mit den Icons bei der Elternliste auftaucht...
  • Internen Cache umgehen abgeschaltet
  • Elternliste + Kinderliste aufgerufen
  • Contao- und MM-Cache geleert ( und nicht neu angelegt)

=> Icons sind noch da - siehe Screenshot

shot304

@zonky2 zonky2 added the question We have a question, please elaborate on the ticket. label Dec 9, 2016
@zonky2
Copy link
Contributor

zonky2 commented Dec 13, 2016

ich habe den Test aus #765 (comment) mit einem größeren Bild - so dass in assets ein temporäres Bild abgelegt wird - wiederholt

das Bild ist dann z.B. assets/images/f/bg_body_pattern-c8fdb6df.png

vorher
shot305

caches geleert
shot306

anschließend
shot307

=> noch da...

@discordier
Copy link
Member

Das ist seltsam und sollte nicht passieren... dann trifft er bei dir anscheinend nie den cache, das ist seltsam...

@zonky2
Copy link
Contributor

zonky2 commented Dec 13, 2016

und nu?

@discordier
Copy link
Member

Rausfinden warum bei dir der cache nicht genommen wird.

@zonky2
Copy link
Contributor

zonky2 commented Dec 14, 2016

habe mir das auf "Dateiebene" angesehen - beim Löschen/Leeren von "Bildercache leeren" wird die Datei wirklich gelöscht und sobald die (BE-)Seite aufgerufen wird, wird das Thumbnail neu erstellt...

also ich würde sagen, das Issue kann zu - ich kenne auch keine weiteren "Beschwerden" zu dem Thema

@zonky2
Copy link
Contributor

zonky2 commented Dec 15, 2016

o.k. - wenn das Icon in der "normalen Contao-Navigation" sitzt und der Image Cache gelöscht wird, ist das Bild weg und wird nicht neu erstellt :-(

shot309

@zonky2
Copy link
Contributor

zonky2 commented Mar 9, 2017

@discordier

We should put our cached copies into an own images sub directory within the cached assets files which are not getting cleaned by Contao.

you give this the label "easy pick" - realy?

@discordier
Copy link
Member

Well, it is? Just adjust the generate image events to use a destination within our cache directory and you are done.

@zonky2
Copy link
Contributor

zonky2 commented Mar 9, 2017

ah.. o.k. you mean at https://github.com/MetaModels/core/blob/master/src/MetaModels/BackendIntegration/BackendModuleBuilder.php#L173 ?

and write to system/cache/metamodels

@zonky2
Copy link
Contributor

zonky2 commented Mar 9, 2017

Damit bleiben die Icons nach Leerung das Bildercaches bestehen

protected function buildIcon($icon)
{
// Determine image to use.
if ($icon && file_exists(TL_ROOT . '/' . $icon)) {
$event = new ResizeImageEvent($icon, 16, 16);
$this->getEventDispatcher()->dispatch(ContaoEvents::IMAGE_RESIZE, $event);
return $event->getResultImage();
}
return 'system/modules/metamodels/assets/images/icons/metamodels.png';
}

    protected function buildIcon($icon)
    {
        // Determine image to use.
        if ($icon && file_exists(TL_ROOT . '/' . $icon)) {
-            $event = new ResizeImageEvent($icon, 16, 16);
+            $event = new ResizeImageEvent($icon, 16, 16, '', 'system/modules/metamodels/assets/images/backend/' . basename($icon), true);

            $this->getEventDispatcher()->dispatch(ContaoEvents::IMAGE_RESIZE, $event);

            return $event->getResultImage();
        }

        return 'system/modules/metamodels/assets/images/icons/metamodels.png';
    }

ggf. noch prüfen, ob Datei auch erzeugt

-            return $event->getResultImage();
+            if (file_exists(TL_ROOT . '/' . $event->getResultImage())) {
+                  return $event->getResultImage();
+            }

@zonky2 zonky2 removed the question We have a question, please elaborate on the ticket. label Mar 9, 2017
@discordier
Copy link
Member

Aber nicht bei composer update, welches den ganzen Ordner in system/modules/metamodels aufraeumt und neu anlegt.

Du darfst nicht in extension directories schreiben und auch nicht in den "normalen" image cache.
Was spricht gegen assets/images/metamodels?

@zonky2
Copy link
Contributor

zonky2 commented Mar 9, 2017

in assets/images würde ich Contao nicht rein grätschen... Isotope legt direkt im root isotope an - ich würde auf

$event = new ResizeImageEvent($icon, 16, 16, '', 'assets/metamodels/images/' . basename($icon), true);

gehen - wobei leider der Pfad metamodels/images/ nicht automatisch angelegt wird...

@zonky2 zonky2 removed the easy pick This issue is a good start for beginners label Apr 25, 2017
zonky2 added a commit to zonky2/core that referenced this issue May 2, 2017
@zonky2
Copy link
Contributor

zonky2 commented May 2, 2017

PR #1122

@Hauge pls test it

@zonky2 zonky2 added the testing This ticket is reported to be fixed by a developer and should be tested. label May 2, 2017
zonky2 added a commit to zonky2/core that referenced this issue May 5, 2017
@MiniModel
Copy link
Member

This issue has been labeled with testing but got no feedback.

We are reliant on feedback to prove a ticket fixed as we can not tell if the ticket has been
resolved if we receive no feedback.
I will close this ticket now, as I assume it has been resolved.
If the ticket should still be valid, please feel free to reopen it.

@Hauge could you please have a final look at this and tell if your issue has been resolved?

@zonky2
Copy link
Contributor

zonky2 commented May 30, 2017

fixed with #1122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend This seems to be a bug in the backend bug A bug! A bug! Fast, squish it! testing This ticket is reported to be fixed by a developer and should be tested.
Projects
None yet
Development

No branches or pull requests

5 participants