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

ImageType::getFormatedName #1269

Closed
musicpanda opened this issue Nov 29, 2020 · 0 comments
Closed

ImageType::getFormatedName #1269

musicpanda opened this issue Nov 29, 2020 · 0 comments
Labels

Comments

@musicpanda
Copy link

Analyzing the W3c validator evaluation of my site I noticed reports about 'width=""'.

Looking where this came from I saw that Panda's blockcart_mod module contains the line
'cartSize' => Image::getSize(ImageType::getFormatedName('cart'))

So I had a look at ImageType::getFormatedName and noticed that it didn't find anything and returned the search term instead of the desired 'panda_cart_default'.

When I looked at the code it seems completely wrong. The input variable $name is the basic "cart" and yet it is trying to remove the theme name from it in the first line. Later in the module this misunderstanding continues.

getdatakick added a commit that referenced this issue Oct 20, 2021
Method ImageType::getFormatedName() had problems with resolving names
for some legacy image types. For example, if image type was named
'panda_cart_default', then ImageType::getFormatedName('cart') returned
'cart' instead of 'panda_cart_default'.

The new algorithm is more permissive. But it is also more expensive.
However, the caching mechanism should offset the higher performance
requirements, as core/theme usually calls this method many times with
the same parameters.

Closes #1269
getdatakick added a commit that referenced this issue Oct 25, 2021
Method ImageType::getFormatedName() had problems with resolving names
for some legacy image types. For example, if image type was named
'panda_cart_default', then ImageType::getFormatedName('cart') returned
'cart' instead of 'panda_cart_default'.

The new algorithm is more permissive. But it is also more expensive.
However, the caching mechanism should offset the higher performance
requirements, as core/theme usually calls this method many times with
the same parameters.

Closes #1269
eschiendorfer pushed a commit to eschiendorfer/thirtybees that referenced this issue Mar 23, 2022
Method ImageType::getFormatedName() had problems with resolving names
for some legacy image types. For example, if image type was named
'panda_cart_default', then ImageType::getFormatedName('cart') returned
'cart' instead of 'panda_cart_default'.

The new algorithm is more permissive. But it is also more expensive.
However, the caching mechanism should offset the higher performance
requirements, as core/theme usually calls this method many times with
the same parameters.

Closes thirtybees#1269
eschiendorfer pushed a commit to eschiendorfer/thirtybees that referenced this issue May 22, 2022
Method ImageType::getFormatedName() had problems with resolving names
for some legacy image types. For example, if image type was named
'panda_cart_default', then ImageType::getFormatedName('cart') returned
'cart' instead of 'panda_cart_default'.

The new algorithm is more permissive. But it is also more expensive.
However, the caching mechanism should offset the higher performance
requirements, as core/theme usually calls this method many times with
the same parameters.

Closes thirtybees#1269
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants