GoteoFoundation / goteo

Goteo Version 3, the Open Source Crowdfunding Platform
http://goteo.org
GNU Affero General Public License v3.0
188 stars 133 forks source link

[fix] $dataSets variable naming #617

Closed subiabre closed 2 months ago

subiabre commented 2 months ago

:tophat: What? Why?

Template at Resources/templates/responsive/partials/components/data_sets.php was expecting to be injected a dataSets prop to walk via foreach. However in Resources/templates/responsive/channel/layout.php this template was being inserted with no dataSets prop, instead it was being inserted with a dataSetsSection prop, which caused the foreach loop to fail with an Invalid argument error.

Testing

This error was being triggered mainly at /channel/feminismos/social-account-telegram. Call to this address, check that the Invalid argument error appears in your logs, then call this address with the updated code and the error will not appear anymore.

:hearts: Thank you!

subiabre commented 2 months ago

@davidbeig reverted my previous changes and applied fixes based on your feedback. I want to thank you for preventing me from polluting the code with an apparently working, but fundamentally flawed, bugfix.

Did not fix the redirection to the /available base type however, as it is out of the original scope of this fix (reduce error logs) and I'm unsure about whether we should redirect or show a not found message.