Jump to content
thirty bees forum

Traumflug

Members
  • Posts

    1,665
  • Joined

  • Last visited

  • Days Won

    82

Posts posted by Traumflug

  1. 26 minutes ago, datakick said:

    Unfortunately that's not realistic solution. There are many modules that uses hardcoded `large_default` or `home_default` image types. These modules don't work on 1.1.0 anymore. 

    Dealing with this class of retrocompatibility would mean to try not only with appending _default, but also with removing this part of the name, right?

  2. 20 hours ago, musicmaster said:

    Try to install a fresh TB 1.10 with the Niara theme and you will see dead image links in the new products section. That module is looking for medium_default

    I see it now. The obvious quick fix is to change this name in the template. views/templates/hook/blocknewproducts.tpl, line 33. Names for image sizes were changed already.

  3. 6 hours ago, datakick said:

    I propose this pull request to strengthen backwards compatibility. @Mark, could you verify that it fixes your issue?

    Not sure which pull request you're talking about. I think the best solution is to let the module search available image types for the best match to the desired size. Another approach would be to let the module register it's own image type. This should reasonably work for all themes and arbitrary image names, then.

  4. 22 hours ago, Occam said:
    50 minutes ago, Traumflug said:
    And then there are modules entirely ignoring all this and hardcoding image names, as if there was always just one shop, just one theme and this theme always had defined image types the module wants. A static world view, just like 1990.

    For a start-up like thirty bees a statement like that sounds pretty presumptuous. Shouldn't thirty bees remain compatible for now?

    thirty bees' message isn't to stick in the 1990's. thirty bees' message is to fix bugs. That's what happened.

    Sometimes fixing one bug exposes another bug. In such cases the right thing is not to revert the bugfix, but to fix the other bug as well.

  5. 2 hours ago, zen said:

    Also there is way  too much images sizes for produits... only 3 or 4 will be enough and will help to maintain an image directory light.

    Jungle drums say, Google still ranks layouts with exactly matching image sizes higher than those using one downloaded image for all these small representations/icons.

    If you changed your theme to get away with fewer image types, don't hesitate to remove the no longer needed ones from the list. Bonus points for also removing them from the theme's config.xml (which gets read at theme installation time, only).

  6. On 9/14/2019 at 12:55 PM, musicmaster said:

    I am puzzled. Prestashop used -home until 1.4. With 1.5 it got a new theme and attached _default behind all the image formats. Are we now going back to the 1.4 naming convention?

    It simply shouldn't matter which image type names a theme uses. There's a database table storing these image types and the whole point of this table is to allow changing these names. A theme can define any image type name it feels a need for. This was "always" the case.

    Since 1.1.0, the theme name gets prefixed to this image type name. Code for this was also "always" there, it was just entirely broken.

    With this code being fixed, thirty bees allows now distinct image types in distinct themes. thirty bees features multishop, each shop can have a different theme and each theme can have its own idea of image sizes. Image type 'home' in theme 1 can have an entire different size than image type 'home' in theme 2, after all.

    And then there are modules entirely ignoring all this and hardcoding image names, as if there was always just one shop, just one theme and this theme always had defined image types the module wants. A static world view, just like 1990.

    Care was taken of these hardcoded image types as well, of course. Requests for images not existing on disk get forwarded to PageNotFoundController, which then tries to find the best match actually existing. Last resort of this controller is to send this camera image, so in the case discussed here it apparently gets activated as expected.

    Apparently there's a situation possible where the fallback mechanism doesn't find what it could find. Debugging can start in these two locations:

    https://github.com/thirtybees/thirtybees/blob/1.1.x/controllers/front/PageNotFoundController.php#L57

    https://github.com/thirtybees/thirtybees/blob/1.1.x/classes/ImageType.php#L241

  7. 21 hours ago, CoffeeGuy said:

    Thanks! I can check there from time to time. As far as upgrading, I'm so afraid to do so. I don't know much about this at all and don't want to screw things up.

    The nice thing about the newer updater is, one can reverse updates. If the newer version doesn't work out, just do this, "update" from 1.1.0 back to 1.0.4.

×
×
  • Create New...