Coder Social home page Coder Social logo

openmage / magento-lts Goto Github PK

View Code? Open in Web Editor NEW
853.0 64.0 437.0 123.11 MB

Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.

Home Page: https://www.openmage.org

License: Open Software License 3.0

PHP 82.62% HTML 11.62% CSS 1.41% JavaScript 3.32% Shell 0.04% Ruby 0.01% SCSS 0.99%
magento-1 php ecommerce ecommerce-platform openmage hacktoberfest composer

magento-lts's Introduction

All Contributors Total Downloads License PHP Security workflow Badge CI workflow Badge

Magento - Long Term Support

This repository is the home of an unofficial community-driven project. It's goal is to be a dependable alternative to the Magento CE official releases which integrates improvements directly from the community while maintaining a high level of backwards compatibility to the official releases.

Pull requests with bug fixes and security patches from the community are encouraged and welcome!


Table of contents

Releases and Versioning

This project more strictly adheres to Semantic Versioning compared to the original Magento version numbering system where the "1" was essentially a fixed number. See the Terminology section of RFC 0002 - Release Schedule for more information on how the terms MAJOR, MINOR and PATCH are defined and applied.

The OpenMage team and community maintains OpenMage LTS versions as follows:

  • The latest MAJOR.MINOR version always receives PATCH updates.
  • The latest MAJOR version always receives MINOR updates.
  • The latest MAJOR.MINOR branch for each MAJOR version receives PATCH updates for at least 2 years from the time of inception of the initial MAJOR version release.

In a nutshell:

  • If you want to stay on the cutting edge with the latest improvements use the latest MAJOR version.
  • If you want maximum backwards compatibility and minimal upgrade hassle use the next-latest MAJOR version so that you can still receive important security/stability/regression fixes.

Currently Maintained Versions

  • 20.x is the latest MAJOR version and will receive PATCH updates until 2 years after the date that 21.x is released.
  • 19.4.x will receive PATCH updates until April 4, 2025.

Requirements

  • PHP 7.4 to 8.3

  • MySQL 5.7+ (8.0+ recommended) or MariaDB

  • optional: Redis 5.x, 6.x and 7.0.x are supported

  • PHP extension intl since 1.9.4.19 & 20.0.17

  • Command patch 2.7+ (or gpatch on MacOS/HomeBrew) since 1.9.5.0 & 20.1.0

Installation

Manual Install

Download the latest release archive and extract it over your existing install. Important: you must download the ZIP file from a tagged version on the releases page, otherwise there will be missing dependencies.

Composer

Step 1: Create a new composer project:

composer init

Step 2: Configure composer. The below options are required. You can see all options here.

# Allow composer to apply patches to dependencies of magento-lts
composer config --json extra.enable-patching true

# Configure Magento core composer installer to use magento-lts as the Magento source package
composer config extra.magento-core-package-type magento-source

# Configure the root directory that magento-lts will be installed to, such as "pub", "htdocs", or "www"
composer config extra.magento-root-dir pub

Step 3: Require magento-core-composer-installer:

# PHP 7
composer require "aydin-hassan/magento-core-composer-installer":"~2.0.0"

# PHP 8
composer require "aydin-hassan/magento-core-composer-installer":"^2.1.0"

Note: be sure to select y if composer asks you to trust aydin-hassan/magento-core-composer-installer.

Step 4: Require the appropriate version of magento-lts:

# Latest tagged v20 series release
composer require "openmage/magento-lts":"^20.0.0"

# Legacy v19 tagged release (Magento 1.9.4.x drop-in replacement supported until April 4, 2025)
composer require "openmage/magento-lts":"^19.4.0"

# Latest on "main" development branch
composer require "openmage/magento-lts":"dev-main"

# Latest on "next" development branch
composer require "openmage/magento-lts":"dev-next"

Note: be sure to select y if composer asks you to trust magento-hackathon/magento-composer-installer or cweagans/composer-patches.

When deploying to a production environment, it's recommended to optimize Composer's autoloader to speed up classes lookup time:

composer dump-autoload --optimize

Git

If you want to contribute to the project:

git init
git remote add origin https://github.com/<YOUR GIT USERNAME>/magento-lts
git pull origin main
git remote add upstream https://github.com/OpenMage/magento-lts
git pull upstream main
git add -A && git commit

More Information

Secure your installation

Don't use common paths like /admin for OpenMage Backend URL. Don't use the path in robots.txt and keep it secret. You can change it from Backend (System / Configuration / Admin / Admin Base Url) or by editing app/etc/local.xml:

<config>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>

Don't use common file names like api.php for OpenMage API URLs to prevent attacks. Don't use the new file name in robots.txt and keep it secret with your partners. After renaming the file you must update the webserver configuration as follows:

Apache .htaccess

RewriteRule ^api/rest api.php?type=rest [QSA,L]

Nginx

rewrite ^/api/(\w+).*$ /api.php?type=$1 last;`

Magento 1 Compatibility

OpenMage LTS 19.4.0 is the first tagged version using the OpenMage LTS version naming system and all 19.x versions are mostly backward-compatible with Magento 1.9.4.x.

OpenMage LTS 20.x and later have more changes that may not be 100% backward-compatible, but minimizing migration and upgrade hassle for users is always considered an important goal and factors heavily into the changes that are accepted even when accepting changes for "MAJOR" releases, described in Releases and Versioning above.

Changes

Most important changes will be listed here, all other changes since 19.4.0 can be found in release notes.

Between Magento 1.9.4.5 and OpenMage 19.x

  • bug fixes and PHP 7.x, 8.0, 8.1 and 8.2 compatibility
  • added config cache for system.xml (#1916)
  • added frontend_type color (#2945)
  • search for "NULL" in backend grids (#1203)
  • removed lib/flex containing unused ActionScript "file uploader" files (#2271)
  • Mage_Catalog_Model_Resource_Abstract::getAttributeRawValue() now returns '0' instead of false if the value stored in the database is 0 (#572)
  • PHP extension intl is required
  • Deprecation errors are not suppressed anymore
  • removed modules:
    • Mage_Backup (#2811)
    • Mage_Compiler
    • Mage_GoogleBase
    • Mage_PageCache (#2258)
    • Mage_Poll (#3098)
    • Mage_Xmlconnect
    • Phoenix_Moneybookers

If you rely on those modules you can reinstall them with composer:

  • Mage_Backup: composer require openmage/module-mage-backup
  • Mage_PageCache: composer require openmage/module-mage-pagecache
  • Mage_Poll: composer require openmage/module-mage-poll
  • Legacy frontend themes: composer require openmage/legacy-frontend-themes

Between OpenMage 19.x and 20.x

Do not use 20.x.x if you need IE support.

  • removed IE conditional comments, IE styles, IE scripts and IE eot files (#1073)
  • removed frontend default themes (default, modern, iphone, german, french, blank, blue) (#1600)
  • fixed incorrect datetime in customer block ($useTimezone parameter) (#1525)
  • added redis as a valid option for global/session_save (#1513)
  • reduce needless saves by avoiding setting _hasDataChanges flag (#2066)
  • removed support for global/sales/old_fields_map defined in XML (#921)
  • enabled website level config cache (#2355)
  • made overrides of Mage_Core_Model_Resource_Db_Abstract::delete respect parent api (#1257)
  • rewrote Mage_Eav_Model_Config as cache for all eav entity and attribute reads (#2993)

For full list of changes, you can compare tags.

Since OpenMage 19.5.0 / 20.1.0

PHP 7.4 is now the minimum required version.

Most of the 3rd party libraries/modules that were bundled in our repository were removed and migrated to composer dependencies. This allows for better maintenance and upgradability.

Specifically:

  • phpseclib, mcrypt_compat, Cm_RedisSession, Cm_Cache_Backend_Redis, Pelago_Emogrifier (#2411)
  • Zend Framework 1 (#2827)

If your project uses OpenMage through composer then all dependencies will be managed automatically.
If you just extracted the release zip/tarball in your project's main folder then be sure to:

  • remove the old copy of aforementioned libraries from your project, you can do that with this command:

    rm -rf app/code/core/Zend lib/Cm lib/Credis lib/mcryptcompat lib/Pelago lib/phpseclib lib/Zend
  • download the new release zip file that is named openmage-VERSIONNUMBER.zip, this one is built to contain the vendor folder generated by composer, with all the dependencies in it

  • extract the zip file in your project's repository as you always did

We also decided to remove our Zend_DB patches (that were stored in app/code/core/Zend) because they were very old and not compatible with the new implementations made by ZF1-Future, which is much more advanced and feature rich. This may generate a problem with `Zend_Db_Select' statements that do not use 'Zend_Db_Expr' to quote expressions. If you see SQL errors after upgrading please remember to check for this specific issue in your code.

UPS shut down their old CGI APIs so we removed the support for it from the Mage_Usa module.

Between OpenMage 20.x and 21.x (unreleased, available on branch next)

  • PHP 8.1 as minimum required version
  • Removed scriptaculous/dragdrop.js (#3215)
  • RWD theme: updated jQuery to 3.7.0 (#3204)
  • Unified CSRF configuration (#3147) and added form key validation to Contacts form (#3146)
  • Removed double span element from HTML buttons (#3123)
  • Removed all deprecated Mysql4_ classes (#2730). If there are any old modules/extensions in your installation that use such classes, you must run shell/rename-mysql4-class-to-resource.php in the command line in order to convert them. Backup all files before running the script
  • Removed "admin routing compatibility mode" (#1551)

New Config Options

  • admin/design/use_legacy_theme
  • admin/global_search/enable
  • admin/emails/admin_notification_email_template
  • catalog/product_image/progressive_threshold
  • catalog/search/search_separator
  • dev/log/max_level
  • newsletter/security/enable_form_key
  • sitemap/category/lastmod
  • sitemap/page/lastmod
  • sitemap/product/lastmod

New Events

  • adminhtml_block_widget_form_init_form_values_after
  • adminhtml_block_widget_tabs_html_before
  • adminhtml_sales_order_create_save_before
  • checkout_cart_product_add_before
  • core_app_run_after
  • sitemap_cms_pages_generating_before
  • sitemap_urlset_generating_before

Full list of events

Changes to SOAP/WSDL

Since 19.4.17/20.0.15 we changed the targetNamespace of all the WSDL files (used in the API modules), from Magento to OpenMage. If your custom modules extends OpenMage's APIs with a custom WSDL file and there are some hardcoded targetNamespace="urn:Magento" strings, your APIs may stop working.

Please replace all occurrences of

targetNamespace="urn:Magento"

with

targetNamespace="urn:OpenMage"

or alternatively

targetNamespace="urn:{{var wsdl.name}}"

to avoid any problem.

To find which files need the modification you can run this command from the root directory of your project.

grep -rn 'urn:Magento' --include \*.xml

Development Environment with DDEV

  • Install ddev
  • Clone the repository as described in installation (Git)
  • Create a ddev config, defaults should be good for you
    ddev config
  • Open .ddev/config.yaml and change the php version to your needs
  • Download and start the containers
    ddev start
  • Open your site in browser
    ddev launch

PhpStorm Factory Helper

This repo includes class maps for the core Magento files in .phpstorm.meta.php. To add class maps for installed extensions, you have to install N98-magerun and run command:

n98-magerun.phar dev:ide:phpstorm:meta

You can add additional meta files in this directory to cover your own project files. See PhpStorm advanced metadata for more information.

Public Communication

  • Discord (maintained by Flyingmana)

Maintainers

License

Contributors ✨

Thanks goes to these wonderful people (emoji key):


sv3n

Lee Saferite

Colin Mollenhour

David Robinson

Tymoteusz Motylewski

Daniel Fahlke

SNH_NL

Marc Romano

Fabian Blechschmidt

Luboš Hubáček

Erik Dannenberg

Jeroen Boersma

Leandro F. L.

Kevin Krieger

Ng Kiat Siong

bob2021

Bastien Lamamy

Dmitry Furs

Robert Coleman

Milan Davídek

Matt Davenport

elfling

henrykb

Tony

Mark Lewis

Eric Sean Turner

Eric Seastrand

Tobias Schifftner

Simon Sprankel

Tom Lankhorst

shirtsofholland

sebastianwagner

Maxime Huran

Pepijn

manuperezgo

luigifab

Loek van Gool

kpitn

kalenjordan

IOWEB TECHNOLOGIES

Florent

dvdsndr

Vincent MARMIESSE

Lucas van Staden

zamoroka

wpdevteam

Wouter Samaey

Vova Yatsyuk

Trevor Hartman

Somewhere

Fabian Schmengler />

Roman Hutterer

Sergei Filippov

Sam Steele

Ricardo Velhote

Roy Duineveld

Roberto Sarmiento Pérez

Pierre Martin

Rafał Dołgopoł

Rafael Patro

Andreas Pointner

Paul Rodriguez

ollb

Nicholas Graham

Makis Palasis

Miguel Balparda

Mark van der Sanden

Micky Socaci

Marvin Sengera

Kostadin A.

Julien Loizelet

Jonas Hünig

Stefan Jaroschek

Jacques Bodin-Hullin

Wilhelm Ellmann

Edwin.

drago-aca

Daniel Niedergesäß

J Davis

Damien Biasotto

Daniel Corn

Paweł Cieślik

André Herrn

Pablo Benmaman

aterjung

altdovydas

Alisson Júnior

Alex Kirsch

Branden

Pof Magicfingers

Michael Thessel

Jonathan Laliberte

Ivan Chepurnyi

Igor

Elias Kotlyar

Hejty1

Gaelle

Frédéric MARTINEZ

Tobias Faust

AndresInSpace

Francesco Boes

Daniel Bachmann

Damian Luszczymak

Fabrizio Balliano

Jouriy

Digital Pianism

Justin Beaty

ADDISON

Aria Stewart

Dean Williams

Henry Hirsch

kdckrs

Martin René Sørensen

Frank Rochlitzer

AlterWeb

Caprico

David Windell

Dragan Atanasov

Eugene Lamskoy

Ferdinand

Himanshu

Jakub Idziak

Joseph Maxwell

Joshua Dickerson

Kevin Bortnick

Mehdi Chaouch

Mohamed ELIDRISSI

Justin van Elst

Nicholas Graham

Patrick Schnell

Patrick Cronin

Petr Švamberg

Rafael Corrêa Gomes

Ralf Siepker

Sunel Tr

Tom Klingenberg

Toon

WEXO team

Wilfried Wolf

akrzemianowski

andthink

eetzen

lemundo-team

mdlonline

Benjamin MARROT

Tino Mewes

Carsten Brandt

Enéias Ramos de Melo

Scott Moore

Roger Feese

Alexander Gelzer

David Hiendl

Andrey Gorbunov

Tomasz Gregorczyk

Juho Hölsä

Kane

Kevin Jakob

Michael Leiss

Marcos Steverlynck

Andy Hudock

Christoph Massmann

This project follows the all-contributors specification. Contributions of any kind welcome!

magento-lts's People

Contributors

addison74 avatar bastienlm avatar colinmollenhour avatar daim2k5 avatar dependabot[bot] avatar drobinson avatar edannenberg avatar elidrissidev avatar empiricompany avatar fballiano avatar flyingmana avatar jeroenboersma avatar justinbeaty avatar kiatng avatar kyrena avatar leesaferite avatar loekvangool avatar luigifab avatar mark-netalico avatar mattdavenport avatar midlan avatar rjocoleman avatar schrank avatar sdfendor avatar seansan avatar sekiphp avatar spinsch avatar sreichel avatar tmotyl avatar woutersamaey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magento-lts's Issues

Import Magento Release 1.9.3.0

Hi @OpenMage/lts-admins

I've created the new branch for the 1.9.3 release after importing the diff from OpenMage/magento-mirror@d48bebc

There were some patch conflicts - surprisingly most of them were related to patches we've already applied for PHP 7 support (although Magento does not claim compatibility with PHP 7 with this release). Regardless, I've listed the files I encountered patch conflicts with below:

.//app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php.rej
.//app/code/core/Mage/Core/Model/Layout.php.rej
.//app/code/core/Mage/ImportExport/Model/Export/Entity/Customer.php.rej
.//app/code/core/Mage/ImportExport/Model/Export/Entity/Product/Type/Abstract.php.rej
.//app/code/core/Mage/ImportExport/Model/Import/Uploader.php.rej
.//app/code/core/Mage/Sales/etc/config.xml.rej
.//app/code/core/Mage/Tax/etc/config.xml.rej
.//app/locale/en_US/Mage_Rss.csv.rej
.//lib/Varien/File/Uploader.php.rej

Please review what I ended up with and compare it both with the history of this repo and the official release. If you approve of the resolution I came up with add +1 to this issue. If you have any problems (with these files or any others), please outline them here and I'll work on resolving them in the new branch.

Once we have +3 or so I'll update the default branch on this repo to 1.9.3 (effectively releasing it). Sorry we can't do this in a PR - I don't think you can submit a PR for a new branch...

Mage\Customer\sql\customer_setup\upgrade-1.6.2.0.4-1.6.2.0.5.php doesn't expect: "sample_data"

Installer error in with: magento-sample-data-1.9.2.4-2016-10-11-07-38-13

in:
\app\code\core\Mage\Customer\sql\customer_setup\upgrade-1.6.2.0.4-1.6.2.0.5.php

$table = $installer->getConnection()
    ->newTable($installer->getTable('customer/flowpassword'))
    ->addColumn('flowpassword_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(

fix:

$installer->startSetup();
if (!$installer->getConnection()->tableColumnExists($installer->getTable('customer/flowpassword'), 'flowpassword_id')) {
  $table = $installer->getConnection()

Apply Patch SUPEE-8788 and create branch for 1.9.3.*

Only source so far: https://twitter.com/DigitalPianism/status/785856489164509186

Magento is getting a version increase this/next week. In the past to deal with the extra changes we've introduced in this repository we'd follow this workflow:

  1. Import the new core as-is to https://github.com/OpenMage/magento-mirror
  2. Run diff on the latest version there to the previous version
  3. Apply that diff to this repository, push into new branch (matching version #)
  4. Update default branch to this new branch
  5. Apply Magento provided patch manually to all applicable previous version branches here.

I can take care of this, but I wanted to highlight the process here for anyone that was interested, or in case I'm unable to do it in the future (assuming this isn't the last ever update to 1.*). Let me know if I'm missing something, or if you have any suggestions for this process.

If You're Typing the Word MCRYPT Into Your PHP Code, You're Doing It Wrong

https://paragonie.com/blog/2015/05/if-you-re-typing-word-mcrypt-into-your-code-you-re-doing-it-wrong

Mage_Core_Model_Encryption uses Varien_Crypt which implements mcrypt by default.
I propose the following:

  • Add Varien_Crypt_Openssl to implement encryption via Openssl using whatever the best practices are for secure encryption.
  • Read a config key global/crypt/method to get a specific method if specified. Default to mcrypt if not specified for backwards compatibility.
  • Add global/crypt/method -> openssl to the local.xml.template so that for new installations the default is openssl. I don't really care to support platforms without openssl so I don't even know if one exists or if they are common but I think it is perfectly reasonable to require a supported encryption library for an ecommerce platform.. It can easily be added to list of modules required during install.
  • Write a script to migrate encrypted data from old method/key to new method/key. (find all encrypted config values, decrypt, re-encrypt with new key/method and save over old local.xml)
    • Note, Magento CE had a major bug up until 1.8/1.9 whereby a VERY poor encryption key was generated at installation so without a migration script if you are using one of these keys you basically might as well not even be using any encryption it is so bad. I tried to raise this with Magento on a magento2 issue but my warnings were completely ignored since they already have such a migration script for EE apparently.

EDIT:
Oh yeah, mcrypt will be deprecated in PHP 7.1 and removed in the version after. More info: https://wiki.php.net/rfc/mcrypt-viking-funeral

composer.json type value

is there a specific reason why the type is set to magento-source? Other projects choose magento-core which is supported by at least 2 composer installers

fatal error when filtering upsell products by position

Magento backend in product edit page, go to "upsells" and then put some value into fields for filtering "position" column.
Click "search"
you will get a fatal error:

Fatal error: Call to a member function getBackend() on a non-object in app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816

Call Stack:
    0.0003     136612   1. {main}() index.php:0
    0.0009     187188   2. Mage::run() index.php:88
    0.0027     342548   3. Mage_Core_Model_App->run() app/Mage.php:684
    0.0569    1786748   4. Mage_Core_Controller_Varien_Front->dispatch() app/code/core/Mage/Core/Model/App.php:354
    0.0607    1838772   5. Mage_Core_Controller_Varien_Router_Standard->match() app/code/Core/Mage/Core/Controller/Varien/Front.php:172
    0.0707    1930612   6. Mage_Core_Controller_Varien_Action->dispatch() app/code/core/Mage/Core/Controller/Varien/Router/Standard.php:254
    0.3573    6863216   7. Mage_Adminhtml_Catalog_ProductController->upsellGridAction() app/code/core/Mage/Core/Controller/Varien/Action.php:418
    0.6426   12500524   8. Mage_Core_Controller_Varien_Action->renderLayout() app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php:392
    0.6431   12501852   9. Mage_Core_Model_Layout->getOutput() app/code/core/Mage/Core/Controller/Varien/Action.php:390
    0.6431   12501912  10. Mage_Core_Block_Abstract->toHtml() app/code/core/Mage/Core/Model/Layout.php:555
    0.6447   12511452  11. Mage_Core_Block_Text_List->_toHtml() app/code/core/Mage/Core/Block/Abstract.php:920
    0.6447   12511764  12. Mage_Core_Block_Abstract->toHtml() app/code/core/Mage/Core/Block/Text/List.php:43
    0.6455   12512396  13. Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml() app/code/core/Mage/Core/Block/Abstract.php:919
    0.6455   12512436  14. Mage_Adminhtml_Block_Widget_Grid->_prepareGrid() app/code/core/Mage/Adminhtml/Block/Widget/Grid.php:646
    0.7784   13525688  15. Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Upsell->_prepareCollection() app/code/core/Mage/Adminhtml/Block/Widget/Grid.php:639
    0.8102   13727904  16. Mage_Adminhtml_Block_Widget_Grid->_prepareCollection() app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php:123
    0.8126   13755416  17. Mage_Adminhtml_Block_Widget_Grid->_setFilterValues() app/code/core/Mage/Adminhtml/Block/Widget/Grid.php:519
    0.8133   13756108  18. Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Upsell->_addColumnFilterToCollection() app/code/core/Mage/Adminhtml/Block/Widget/Grid.php:457
    0.8133   13756108  19. Mage_Adminhtml_Block_Widget_Grid->_addColumnFilterToCollection() app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php:87
    0.8135   13756620  20. Mage_Eav_Model_Entity_Collection_Abstract->addFieldToFilter() app/code/core/Mage/Adminhtml/Block/Widget/Grid.php:472
    0.8135   13756620  21. Mage_Catalog_Model_Resource_Product_Collection->addAttributeToFilter() app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php:341
    0.8135   13756648  22. Mage_Eav_Model_Entity_Collection_Abstract->addAttributeToFilter() app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php:1438
    0.8136   13756648  23. Mage_Eav_Model_Entity_Collection_Abstract->_getAttributeConditionSql() app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php:321
    0.8136   13756676  24. Mage_Eav_Model_Entity_Abstract->isAttributeStatic() app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php:1379

tested with Magento 1.9.2

Improve post-checkout reindexing

Many of the indexers call Mage_Index_Model_Resource_Abstract::disableTableKeys(), which runs a statement like this: ALTER TABLE ... DISABLE KEYS. Then, after some rows are inserted into the index table, enableTableKeys() is called.

As far I can see DISABLE/ENABLE KEYS only works with MyISAM tables, so it isn't used by modern Magento installations. What's worse is in MySQL 5.5+ the ALTER TABLE statement requires a table metadata lock.

As the statement doesn't actually do anything it could be removed and the lock would be avoided (though its possible it might cause problems for older installations that might still have MyISAM tables)

It may seem like it wouldn't have that much impact as the lock should only be for a very short time, but in production I've seen large queues of queries 'Waiting for table metadata lock' on tables like cataloginventory_stock_status and catalog_product_index_price when the ALTER TABLE statement is blocked by some other very slow transaction.

Improve global search (note)

This is a note to improve global search. If someone already has some working code then this is great.

Things to improve, maybe there is more

  • replace search with %STRING%, orders numbers like %STRING (often we only get last couple of digits xxx not the leading 300000xxxx)
  • search for lastname, firstname, email, order number
  • if ordernumber found then show orders first
  • if customer data used to localize then show customer data first
  • improve 2nd line small font span element (giving extra information)
  • add store name to order number in results
  • sort by last created orders first (this is probably what the customer is calling about)
  • add some index because the search can be really really slow (try using it with someone on the telephone)

PHP7 .htaccess

the .htaccess file should also include directives for mod_php7.c

<IfModule mod_php7.c>

Varien_Io_File has an erratic implementation of cd

    /**
     * Change current working directory
     *
     * @param string $dir
     * @return boolean
     */
    public function cd($dir)
    {
        if( is_dir($dir) ) {
            @chdir($this->_iwd);
            $this->_cwd = realpath($dir);
            return true;
        } else {
            throw new Exception('Unable to list current working directory.');
            return false;
        }
    }

The thrown exception is superflous and breaks the interface.

Please review 1.9.3.1 import via merge

I merged the openMage-mirror State/Tag/Commit into a new branch 1.9.3.1 here.
I would like to have someone review it, so we can make it to the new default branch.

Magento removes old sessions without limit

Session Garbage collector in Magento uses delete query without limit to remove old sessions.
See
https://github.com/OpenMage/magento-lts/blob/1.9.3.0/app/code/core/Mage/Core/Model/Resource/Session.php#L280

On instances with tons of sessions this causes long lasting lock on the session table blocking the whole website rendering.

Magento tries to cleanup old sessions every 50 sessions, so it's very often. So most of the time, Magento will scan the whole session table for nothing.

I think we should increase the _automaticCleaningFactor to at last 1000, or even disable automatic GC and provide a cron job instead. Another solution would be to add a check to GC to execute it maximum once a day ...

Paypal IPN and aurthorise.net bugs

Hi, all

Steve from xpractical.com.au here

Here are two bugs fixes in our production site. The hidden discount one causes magento/paypal to mark the order as fraud as the totals from the two systems don't add up with certain discount and tax settings. The IPN one causes an attempted order cancel to fail and mark the order as processing which in our system means its ok to ship and is picked up by our ERP integration.

There is also a bug in paypal express that skips the inventory decrement after successful order processing. Have not found a fix for that yet.

We have also found a bug in the aurthorise.net payment gateway. It will return "payment-ok" status on magento payment-update even if the payment has been cancelled. This means you cant use payment-update button.

Hope these tips help. Our site php7/magento community 1.9.3.1 is "mid" size at 30-100 orders per day @ $500-1500 per order with store views for US, UK and AU.

Bugs still in 1.9.3.1

mcd_steven@stage2:/var/www/temp-magento$ diff app/code/core/Mage/Paypal/Model/Ipn.php /var/www/magento/app/code/core/Mage/Paypal/Model/Ipn.php
533a534,540
> // MOD SMCD paypal bug, must remove invoice before order cancel otherwise order cancel will fail and go to processing
> foreach ($this->_order->getInvoiceCollection() as $invoice){
> $invoice->cancel()->save();
> }

mcd_steven@stage2:/var/www/temp-magento$ diff /var/www/magento/app/code/core/Mage/Paypal/Model/Hostedpro/Request.php /var/www/temp-magento/app/code/core/Mage/Paypal/Model/Hostedpro/Request.php
160,161c160
< // MOD SMCD 2016 - added hidden tax, missing this causes fraud trigger
< 'tax' => $this->_formatPrice($order->getBaseTaxAmount() + $order->getHiddenTaxAmount() ),
---
> 'tax' => $this->_formatPrice($order->getBaseTaxAmount()),

Wrong labels in translation file Mage_Catalog

The file
https://github.com/OpenMage/magento-lts/blob/1.9.1/app/locale/en_US/Mage_Catalog.csv#L482

contains label "Please specify the product's option(s)" which is wrong. It should be "Please specify the product's option(s)".
Also all other languages are affected. This bug prevents magento from translating this message and it always appear in english.

Probably sb just copied the label from
https://github.com/OpenMage/magento-lts/blob/1.9.1/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php#L689

where slash is added to escape single quote in php.

This message appear eg. when you try to add to cart configurable product from wishlist. But the product is not yet configured

Bundles - price without tax on frontend

Hi. old bug still present. If store uses prices excluding tax on admin area, prices on frontend category are without tax showing "as low as PRICE with tax" instead of including tax. The same appears on product page and cart/checkout bundle product row shows associated product price without tax also
Issue presented in all 1.9 versions, 1.9.3 shows correct price as configured right know - so its a small fix for bundles

iterating over functions in opcheckot.js

in opcheckout.js https://github.com/OpenMage/magento-lts/blob/1.9.2.1/skin/frontend/base/default/js/opcheckout.js#L93 the for loop iterates over all object properties, including functions.
If one of the properties is undefined, the script will break, and it will NOT be possible to proceed with checkout.

This happend to us once livechat vendor has error in their js (hosted by them) which added an undefined property to dom objects. And it broke the chekout.

How it should be solved:
we should not loop over all object properties, but only over DOM nodes.

Thoughts on updating minimum MySQL version supported?

MySQL versions older than 5.5 are no longer supported by Oracle. Newer versions add features like fulltext index support on InnoDB tables, ALTER TABLE ALGORITHM=INPLACE, generated columns, etc. Too many new features to name. Also to support things like Galera cluster it is necessary to drop support for MyISAM tables. However, to drop MyISAM support we need to require at least MySQL 5.6 to support fulltext index for catalogsearch module. Before I start creating PRs I'd like to establish what the new minimum MySQL version should be. My suggestion would be 5.6.

How should we do release version numbers?

In the past Magento didn't really follow a helpful versioning pattern (see readme). However, lately they are sticking to patch level version increases, so we should revisit how we do our branching and release tagging for this repo. Any thoughts/suggestions?

Missing $_eventPrefix ... worth to be fixed?

Before i start a PR, i just want to know if you would accept it.

There are some models w/o $_eventPrefix set, e.g. Mage_Cms_Model_Block. Let's assume you want to observe CMS-Block save, you have to use one of these generic events model_save_before or core_abstract_save_before and check instance of the object. It works, but life could be easier :)

Add composer.json

Would you consider adopting composer and registering with the Firegento repository? You already have all versions properly tagged, along with Magento composer installer this could be very useful for a lot of people.

Product image not visable in Backend

Hi,

I am using Magento 1.9.2.4.

When I add a new product and want to upload an productimage, this image doesn't appear. After clicking on the upload button, you see that upload is 100%, but then nothing happens. No image.

How can this bug fixed?
schermafbeelding 2016-04-14 om 11 18 45

General thoughts on merge-process

On a quick hop through the 1.9.2.4-branch tree I found some orphan files like connect package xmls from Magento 1.9.1.0.

https://github.com/OpenMage/magento-lts/tree/1.9.2.4/var/package

I have not investigated further (like doing a real diff on a vanilla 1.9.2.4), but things like this always made me suspiciously looking at "public magento mirrors".
Of course, nobody will ever do a mage upgrade-all when using this repo.
But what I wanted to pick up basically: is it the only "merge-fail"?

This is not a rant, I rather want to point out a serious problem.

Magento error: Front controller reached 100 router match iterations

Magento error: Front controller reached 100 router match iterations

I recall seeing an issue about this here but I could not find it

Apparently according to the link below this is a confirmed error and a fix exists

Can we apply this fix against the code? (sorry I dont know how to diff against github)

Please confirm and apply fix

https://github.com/convenient/magento-ce-ee-config-corruption-bug#update-good-news-a-patch-from-magento

https://github.com/convenient/magento-ce-ee-config-corruption-bug/blob/master/PATCH_SUPEE-4755_EE_1.13.1.0_v1.sh#L172

Should we mv install.php?

Should we mv install.php?

Just saw some request being made on our server to install.php - after upgrading via LTS this file is recreated everytime.

Question: how logic is it that a newby user would use LTS as a first time Magento install? And can we move or rename install.php so it is not executed anymore

Anyone installing from here can anyways read the README and read something like rename file "xxx" to install.php before installing

General Project Questions

Sorry if this is not the appropriate place for this discussion, just let me know if I should move it elsewhere. I just have some questions about the project:

Is there any collaboration with Magento, Inc to get these fixes merged in the official Magento? I assume the lifetime of M1 is nearing it's end but it seems like a good opportunity to improve the original product since you are essentially doing what they say they don't have time to do (manage issues and pull requests).

Where do you draw the line between an appropriate PR and an inappropriate one? Examples:

  • I determined that storing the admin ACL inside each session is a terrible design and it is better to cache the ACL and just store the admin user_id in the session. This results in huge session storage reductions and fixes some issues with ACL not being reloaded when it should. I can implement it so that existing sessions are not broken and will be gracefully updated and the public/protected class interface is 100% compatible so there is 0 impact to users but it is a somewhat significant change otherwise.
  • Similarly space in sessions can be saved by moving the validator data to it's own key and not duplicating it for every namespace.
  • Vardoc fixes/improvements that make code completion work with PhpStorm much much better (e.g. using @return $this, fixing incorrect vardocs, adding @method annotations like @method Mage_Catalog_Model_Product[] getIterator(), etc).

Eh, I forgot all of the fixes and improvements I've made offhand but in general what are the rules for accepting/rejecting?

Thanks for your contributions!

Should I use magento-lts instead of Magento 1.9.2.4?

Hello guys,

I'm following this project closely and trying to understand if dropping the default 1.9.2.4 and move to magento-lts has benefits and if it also provides stability to run it on production. Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.