Jump to content
thirty bees forum

Recommended Posts

Posted

The thumbnails are generated and regenerated and regenerated. The HTaccess file is generated and deleted and regenerated. What do you need a link to? The pictures appear to be trying to link to a directory that does not exist.

Is there somewhere in the database that you can edit the links?

The site is atย https://www.firefightersfair.net/

Also I should note that it does not matter what theme is used, it is just broken.

Posted

@pmfjoe Your link looks like https://www.firefightersfair.net/13-PMF eTicket Store Theme_home_smallest/power-pass-eticket2x.jpg which is bad. But now we know what happend and what went wrong ๐Ÿ™‚ That's why I asked for page.

I may be wrong, but your "template" made some error with thumbnail name generation. Maybe template creator used theme name to prefix theme images. And they contain not proper characters. Basically you have to fix your template. But that's just a guess. You would have to:

- Fix thumbnail names to only contain a-z0-9_ characters.
- Fix template (in .tpl files), to use new thumbnail names.

PS: Link do not contain directory path. This adress is dynamically translated by htaccess

Posted

Even switching to the default community theme and regenerating thumbnails does not resolve the issue. I would also note that this theme is a direct copy of the default community theme.

Posted

@pmfjoe Screen from Images section? Where thumbnail names are?

Also 13-PMF eTicket Store Theme_home_smallest in names still exist... so why is some kind of other theme names in your image names? Seems installation of this theme made some permanent changes to your shop.

Posted (edited)

My standard next step in this kind of situations is to disable pretty urls. That makes it much easier what file is looked for and what is there.

But there are other potential trouble spots such as the spaces in the filenames and the "2x". Spaces are allowed when the filename is within quotes and that is sometimes a problem.ย 

Edited by musicmaster
Posted

Acually... i think it may be related to this function...

 /**
     * Find an existing variant of a specific image type.
     *
     * @param string $name
     *
     * @return string
     *
     * @throws PrestaShopDatabaseException
     * @throws PrestaShopException
     * @version 1.0.0 Initial version
     */
    public static function getFormatedName($name)
    {
        $themeName = Context::getContext()->shop->theme_name;
        $nameWithoutTheme = str_replace(
            ['_'.$themeName, $themeName.'_'],
            '',
            $name
        );

        if (static::typeAlreadyExists($themeName.'_'.$nameWithoutTheme)) {
            return $themeName.'_'.$nameWithoutTheme;
        } elseif ($themeName
            && strpos($name, $themeName) !== false
            && static::typeAlreadyExists($name)) {
            return $name;
        // These last two are for retrocompatibility.
        } elseif (static::typeAlreadyExists($nameWithoutTheme.'_'.$themeName)) {
            return $nameWithoutTheme.'_'.$themeName;
        } elseif (static::typeAlreadyExists($nameWithoutTheme.'_default')) {
            return $nameWithoutTheme.'_default';
        }

        // if $name contains _default suffix, ie. home_default then try to resolve the name without this suffix
        $pos = strpos($name, '_default');
        if ($pos === strlen($name) - 8) {
            return static::getFormatedName(substr($name, 0, $pos));
        }

        // Give up searching.
        return $name;
    }

No theme name normalization. @Traumflug @datakick is it safe to allow name?

Posted

For example, here you have :

https://www.firefightersfair.net/13-home/power-pass-eticket2x.jpg

this image does not exist, it has not been generated with Big sizes...

but the original one :https://www.firefightersfair.net/13-home/power-pass-eticket.jpg works correctly.

I guess you have problem with 2x generated images.. You better turn it off if not necessary or try again to set it up correctly and generate the images again when this option is on...

Good luck, if you want this to be fixed and verified, please give credentials for BO and FTP.

Posted (edited)

Ended up switching back to the community theme itself and then directly editing it. Seems like something gets seriously broken when you use the theme exporter. (Export current Theme).ย 

I was trying not to directly modify the community theme itself to prevent issues with future updates.

Edited by pmfjoe
Posted
On 12/26/2019 at 3:45 PM, Kashir2000 said:

Also 13-PMF eTicket Store Theme_home_smallest in names still exist... so why is some kind of other theme names in your image names?

Since thirty bees 1.1.0 that's expected. Before, themes using the same image name would overwrite each other's image types. Now each theme installs its own set, allowing distinct image types in distinct themes.

The only unfortunate thing here is that the new mechanism uses the theme name for the distinction. Using the theme directory would have been the better choice. Two themes can share the same name, but not the same directory.

  • Like 1
Posted
1 hour ago, pmfjoe said:

Seems like something gets seriously broken when you use the theme exporter.

Theme exporter got a lot better with thirty bees 1.1.0, but it's not perfect yet. There are a few bits missing in the theme configuration.

Easiest way to duplicate a theme is to duplicate its directory with all its content, then editing its config file to change 'directory' and 'name'. That done, the duplicated theme can get installed, it shows up in the list. And yes, installing themes on disk was broken before 1.1.0, they simply wouldn't show up in the list of installable themes.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
ร—
ร—
  • Create New...