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

[2.2.4] Gallery theme variables being ignored #15009

Closed
gwharton opened this issue May 5, 2018 · 12 comments
Closed

[2.2.4] Gallery theme variables being ignored #15009

gwharton opened this issue May 5, 2018 · 12 comments
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@gwharton
Copy link
Contributor

gwharton commented May 5, 2018

(Some) Variables set in the theme's view.xml for the gallery widget appear to be ignored in 2.2.4 (This may also affect other variables, I don't know)

Preconditions

  1. Magento 2.2.4 installed from git
  2. No modules
  3. Single website, theme set to luma

Steps to reproduce

  1. Create product and assign product image, ensuring you set the AltText for the image
  2. View product on frontend

Expected result

  1. as the luma theme sets the variable gallery/caption to false the AltText should not be displayed on the gallery widget.

Actual result

  1. The product image has the AltText displayed at the bottom.

This is new behaviour in 2.2.4. 2.2.3 did not do this.

I also have some other third party code that throws a wobbler, when it looks for the variable gallery/fullscreen/navarrows which it says does not exist, even though it is also declared in lumas view.xml

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label May 5, 2018
@gwharton
Copy link
Contributor Author

gwharton commented May 5, 2018

Debugging from within magento/framework/Config/view.php

    [vars] => Array
        (
            [Magento_Catalog] => Array
                (
                    [gallery] => Array
                        (
                            [nav] => thumbs
                            [loop] => 1
                            [keyboard] => 1
                            [arrows] => 1
                            [caption] => 
                            [allowfullscreen] => 1
                            [navdir] => horizontal
                            [navarrows] => 1
                            [navtype] => slides
                            [transition] => Array
                                (
                                    [effect] => slide
                                    [duration] => 500
                                )

                            [fullscreen] => Array
                                (
                                    [nav] => thumbs
                                    [loop] => 1
                                    [arrows] => 1
                                    [caption] => 
                                    [navdir] => horizontal
                                    [navtype] => slides
                                    [transition] => Array
                                        (
                                            [effect] => slide
                                            [duration] => 500
                                        )

                                    [navarrows] => 
                                )

                        )
                 )
          )

Notice that both Caption and Navarrows are empty, even though in the theme file

        <var name="gallery">
            <var name="nav">thumbs</var> <!-- Gallery navigation style (false/thumbs/dots) -->
            <var name="loop">true</var> <!-- Gallery navigation loop (true/false) -->
            <var name="keyboard">true</var> <!-- Turn on/off keyboard arrows navigation (true/false) -->
            <var name="arrows">true</var> <!-- Turn on/off arrows on the sides preview (true/false) -->
            <var name="caption">false</var> <!-- Display alt text as image title (true/false) -->
            <var name="allowfullscreen">true</var> <!-- Turn on/off fullscreen (true/false) -->
            <var name="navdir">horizontal</var> <!-- Sliding direction of thumbnails (horizontal/vertical) -->
            <var name="navarrows">true</var> <!-- Turn on/off on the thumbs navigation sides arrows(true/false) -->
            <var name="navtype">slides</var> <!-- Sliding type of thumbnails (slides/thumbs) -->
            <var name="transition">
                <var name="effect">slide</var> <!-- Sets transition effect for slides changing (slide/crossfade/dissolve) -->
                <var name="duration">500</var> <!-- Sets transition duration in ms -->
            </var>
            <var name="fullscreen">
                <var name="nav">thumbs</var> <!-- Fullscreen navigation style (false/thumbs/dots) -->
                <var name="loop">true</var> <!-- Fullscreen navigation loop (true/false/null) -->
                <var name="arrows">true</var> <!-- Turn on/off arrows on the sides preview in fullscreen (true/false/null) -->
                <var name="caption">false</var> <!-- Display alt text as image title in fullscreen(true/false) -->
                <var name="navdir">horizontal</var> <!--Sliding direction of thumbnails in fullscreen(horizontal/vertical)  -->
                <var name="navarrows">false</var> <!-- Turn on/off on the thumbs navigation sides arrows(true/false) -->
                <var name="navtype">slides</var> <!-- Sliding type of thumbnails (slides/thumbs) -->
                <var name="transition">
                    <var name="effect">slide</var> <!-- Sets transition effect for slides changing (slide/crossfade/dissolve) -->
                    <var name="duration">500</var> <!-- Sets transition duration in ms -->
                </var>
            </var>
        </var>

It would appear that any item set to false, is not being read properly.

@gwharton
Copy link
Contributor Author

gwharton commented May 5, 2018

And here is the culprit

ccc35c2#diff-79786eac5b88f578b5d99c9ca046d4af

Broken during fix applied for #12285

@gwharton
Copy link
Contributor Author

gwharton commented May 5, 2018

Should be aware that the changes applied in #12285 were only applied to 2.2-develop and not 2.3-develop. Therefore 2.3-develop continues to use the strings "true" and "false" for boolean config variables and therefore does not require this fix.

Update : I have created forwardports of the 12285 fix into 2.3 so they stay in sync

@gwharton gwharton changed the title 2.2.4 Gallery theme variables being ignored [2.2.4] Gallery theme variables being ignored May 6, 2018
@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label May 9, 2018
@magento-engcom-team
Copy link
Contributor

Hi @gwharton. Thank you for your report.
The issue has been fixed in #15022 by @gwharton in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

@magento-engcom-team
Copy link
Contributor

Hi @gwharton. Thank you for your report.
The issue has been fixed in #15020 by @gwharton in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.5 release.

@sidolov
Copy link
Contributor

sidolov commented Aug 1, 2018

Hi @gwharton. Thank you for your report.
The issue has been fixed in #16594 by @gwharton in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.7 release.

@leoquijano
Copy link

Hi @sidolov ,

It seems that the fix wasn't included in the 2.2.7 or the 2.2.8 releases. Can this be included in a future 2.2.x release?

@gwharton
Copy link
Contributor Author

Take a look at 2.2-develop. The whole gallery json code has been reworked and should be much improved in next release.

@leoquijano
Copy link

Thanks @gwharton. I'm just wondering if the patch is going to be included in an official release. Since it's a bug, I think it can be included in 2.2.9 or 2.2.10, right?

@gwharton
Copy link
Contributor Author

Check out #18443. Already merged into 2.2-develop. Will be in 2.2.9. It rewrites all the code causing these issues.

@leoquijano
Copy link

I see!

Looking into it. This is very helpful. Thanks!

@choleaoum
Copy link

I'm currently running 2.3.4 (Bitnami w/ Smartwave's Porto Theme) and this issue appears to still be happening. It's a fresh install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

5 participants