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

Eval.EnableZendZorting/hhvm.enable_zend_zorting needed for some magento extensions #3202

Closed
juliorosier opened this issue Jul 16, 2014 · 24 comments

Comments

@juliorosier
Copy link

Magento website breaks with this module turned on.
In app/etc/modules there are a couple of TBT*.xml files that belong to the module

We found out that if we turn of TBT_RewardsOnly.xml. the problem is fixed.
But off course that is not a beautiful option.

Also there is a calculation issue when updating product amount in shopping cart
from lets say 1 to 3 the subtotal stays at the price of 1 piece.

Using Rubic_FixTotalSorting. does not fix this problem

thanks

@csdougliss
Copy link
Contributor

It might be helpful if you can include some error logs!

@danslo
Copy link
Contributor

danslo commented Jul 16, 2014

Instead of using that module, use -vEval.EnableZendSorting=1 on a recent build (try nightly). Also clear your caches afterwards, magento caches totals.

@csdougliss
Copy link
Contributor

@danslo out of interest what is the related ini setting for it, as the documentation on the wiki is out of date. Thanks

@danslo
Copy link
Contributor

danslo commented Jul 16, 2014

@craigcarnell There isn't one (yet). Add it to your config.hdf.

@csdougliss
Copy link
Contributor

@danslo OK. I've stopped using config.hdf! :)

@fredemmott
Copy link
Contributor

Depending on which API was used, we might automatically have one - in which case, it'll be hhvm.enable_zend_sorting

@csdougliss
Copy link
Contributor

@fredemmott Thanks - I recently setup the admin server for hhvm but I don't see where I can get a list of all current ini settings applied - is this something that could be done? Thanks

@fredemmott
Copy link
Contributor

https://github.com/facebook/hhvm/wiki/INI%20Settings is the most complete list. ini_get_all() will give you some of the current values. This is something we need to improve.

@csdougliss
Copy link
Contributor

@fredemmott Thanks I've added a simple dump script to my application.

["hhvm.enable_zend_sorting"]=>
  array(3) {
    ["global_value"]=>
    string(0) ""
    ["local_value"]=>
    string(0) ""
    ["access"]=>
    int(4)
  }

👍

@fredemmott fredemmott changed the title Sweettoothrewards Eval.EnableZendZorting/hhvm.enable_zend_zorting needed for magento Jul 18, 2014
@fredemmott fredemmott changed the title Eval.EnableZendZorting/hhvm.enable_zend_zorting needed for magento Eval.EnableZendZorting/hhvm.enable_zend_zorting needed for some magento extensions Jul 18, 2014
@fredemmott
Copy link
Contributor

@danslo: the sort order is undefined; does magento itself depend on PHP5's behavior, or is it just some extensions?

@danslo
Copy link
Contributor

danslo commented Jul 18, 2014

@fredemmott Yes, it's Magento itself... but third party extensions may also suffer from it as they can add themselves to the totals collector (like a reward point module).

Anyway, Eval.EnableZendSorting should always be enabled for Magento. I did a PR earlier to add it as an ini setting (#2850) but apparently @ptarjan was working on ini stuff at that point. Maybe it should be reopened / put up for review again.

@fredemmott
Copy link
Contributor

@danslo : I've replied on #2850 - it already works as an ini setting.

@danslo
Copy link
Contributor

danslo commented Jul 18, 2014

👍

@fredemmott
Copy link
Contributor

Given this is in doc/inconsistencies, I don't think there is anything more we should do it within HHVM. It might be worthwhile to file an issue against Magento's installation documentation.

@Majkl578
Copy link
Contributor

Majkl578 commented Nov 7, 2014

@fredemmott: Maybe default to off when not in EnableHipHopSyntax mode?

@fredemmott
Copy link
Contributor

@Majkl578 : we decided not to do that as the PHP documentation explicitly says this behavior is undefined and shouldn't be depended on, and it's not performant.

@rossmc
Copy link

rossmc commented Jul 16, 2015

@danslo I tried adding both hhvm.EnableZendSorting = 1 and -vEval.EnableZendSorting=1 to both my /etc/hhvm/php.ini file or /etc/hhvm/server.ini file. I cleared the cache, re-indexed and tested with the default design package. I have Magento 1.9.

Neither worked but your Rubic_FixTotalSorting module did. I would prefer to use the recommened EnableZendSorting solution, am I implementing it correctly?

@danslo
Copy link
Contributor

danslo commented Jul 16, 2015

@rossmc In ini files it should be hhvm.enable_zend_sorting = 1. Also don't forget to restart HHVM and clear mage to cachrs as it caches sort orders.

@rossmc
Copy link

rossmc commented Jul 16, 2015

@danslo,thanks I'll try that tomorrow. Should it be in both ini files? /etc/hhvm/php.ini file and /etc/hhvm/server.ini file

@danslo
Copy link
Contributor

danslo commented Jul 16, 2015

Either should be fine. Php.ini is used for both the server and command line.

@rossmc
Copy link

rossmc commented Aug 5, 2015

@danslo hhvm.enable_zend_sorting = 1 fixed the issue I had with magento adding up tax totals correctly but I'm still having an issue with the sorting of currency rates.
http://magento.stackexchange.com/questions/76727/hhvm-is-breaking-display-in-manage-currency-rates

@danslo
Copy link
Contributor

danslo commented Aug 5, 2015

Separate issue for sure, if I had to guess it probably has something to do with this inconsistency. Can't exactly say I have a lot of time to investigate this issue though. It would help if someone could narrow it down to a couple lines of PHP (outside of Magento).

@danslo
Copy link
Contributor

danslo commented Aug 5, 2015

I also cannot reproduce this on the latest nightly, so please provide exact instructions.

@rossmc
Copy link

rossmc commented Aug 6, 2015

@danslo I created a new issue for this, can you check if I have enough details provided in it? I tried too add as much as I could think of.

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

No branches or pull requests

6 participants