-
Notifications
You must be signed in to change notification settings - Fork 77
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
Update category-header.tpl #477
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I don't see a reason to get invalid index in line 14.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary IMO
I dont know how to reject this changes, so i hope i do it ok |
yeah, the change is not nessesary as far as i know prestashop environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @rodriciru ,
I tried to install your PR, but I have an error, the theme can't be applied to my FO :
cd themes
rm -rf hummingbird
git clone https://github.com/PrestaShop/hummingbird.git hummingbird
cd hummingbird
git prc origin 477 dev
cd _dev && npm i && npm run build
I also tested to install your PR on the theme hummingbird v0.1.5.
No PR, hummingbird il well installed :
Once I install your PR with, my FO is broken :
Is there something I'm doing incorrectly ?
Also, could you add a "How to test" with screenshots as well ?
Thanks!
@rodriciru Can you show what error you are getting? I deleted the images from the category but I get no error 🤔 |
Highly improbable that that was my fault. I think you also delete the CSS when do the rm command. SO you have no CSS so the website look like this. You have to compile the asset's folder, but that has nothing to do with this PR |
More than an error is a PHP warning in server logs. I have fixed that at my store, so I get no more warnings |
@rodriciru It doesn't throw me a warning even if $category.image is null 🤔, the condition catches it without a notice/error. Weird. I checked both PHP and Symfony error logs and nothing in both. @kpodemski Do you get an error if you have a category without an image and do this? I don't for some reason.
|
I get a php warning at smarty compile (i suppose if i disable cache i will get something similar) |
@rodriciru that's odd, |
Yep, it's weird as hell, but I have some answers.
Compiled result:
Effectively, |
@florine2623 FYI, hummingbird is different from classic-theme. There is no |
@florine2623 Please check my message above when you have time. By the way, I can't understand the logic of this PR. ;) |
Hello @rodriciru , It seems like no one can reproduce your issue, neither @Hlavtox , @kpodemski nor @leemyongpakvn . Could you explain further so it can be reproduced and tested ? |
Hard to explain it more. |
As usual, QA will close the issue if they can not reproduce it 👌 |
@rodriciru I will try to reproduce once again, if you really say it happens. There is no reason for smarty to convert empty to if. If it does so, it's stupid. 🤔 On what core version you are getting this behavior? |
{if !empty($category.image.large.url)} is also present in classic theme, I tried deleting the category images, "image" => null shows on the category dump, tested on PS 8.1.2 and php 7.2, 7.4 and 8.1 still nothing in the php logs or Prestashop log files. so if this is caused by "image" not existing it's maybe an older PS version? But I can't recreate the error on PS 8.1.2. |
I don't remember exactly the version, but I try to keep the latest version
of ps on my stores. So by the time the issue is created, the most recent
version at that time.
Anyway,seeing I'm the only,and can't reproduce by any of yours, let's close
and will open a new one if happens again
El vie, 8 dic 2023 13:21, Daniel ***@***.***> escribió:
… {if !empty($category.image.large.url)} is also present in classic theme, I
tried deleting the category images, "image" => null shows on the category
dump, tested on PS 8.1.2 and php 7.2, 7.4 and 8.1 still nothing in the php
logs or Prestashop log files.
so if this is caused by "image" not existing it's maybe an older PS
version?
To make the check safe it should maybe be something like
{if !empty($category.image) && !empty($category.image.large)}
But I can't recreate the error on PS 8.1.2.
—
Reply to this email directly, view it on GitHub
<#477 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACR6MY62QUHA77W2K7T6RCDYIMA33AVCNFSM6AAAAAAWJLLUUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGA3TSNRWGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Hlavtox @Prestaworks maybe it was a bug in some Smarty version because I noticed that problem as well, I've had |
Do you remember what version of PS it was? |
@Prestaworks 1.7.6 something |
I suggest closing this issue as it cannot be reproduced #476 (comment) |
close #476