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

Fixed .thumbnail load #984

Merged
merged 2 commits into from
Jun 4, 2020
Merged

Fixed .thumbnail load #984

merged 2 commits into from
Jun 4, 2020

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented May 18, 2020

Description (*)

Fixes a bug that .thumbnail images are generated every time.

Read here: https://www.ctidigital.com/blog/fixing-magento-improving-performance-of-the-wysiwyg-editor/

Or here: https://magento.stackexchange.com/questions/279596/1-9-4-breaking-broken-features-what-is-mage-core-model-file-uploadergetcorre

Related Pull Requests

  1. Fixes issue with wysiwyg editor re-creating thumbnails  #261: Fixes issue with wysiwyg editor re-creating thumbnails

Fixed Issues (if relevant)

  1. Performance improvement for WYSIWYG editor #355: Performance improvement for WYSIWYG editor

Manual testing scenarios (*)

  1. go to CMS page or block
  2. add an image via "Insert image" button
  3. Save and continue
  4. add xdebug breakpoint here and you'll see $thumbUrl is alsways false
// generate thumbnail "on the fly" if it does not exists
if (! $thumbUrl) {
    $thumbUrl = Mage::getSingleton('adminhtml/url')->getUrl('*/*/thumbnail', array('file' => $item->getId()));
}
  1. Use "Insert image" button again ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)

@sreichel sreichel removed the hold label May 19, 2020
@sreichel sreichel changed the title Fixed thumbnail url, closes #355, see #261 Fixed .thumbnail load May 19, 2020
Copy link
Member

@colinmollenhour colinmollenhour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Did the first fix only get merged into the 1.9.3.x branch?

@sreichel
Copy link
Contributor Author

sreichel commented Jun 2, 2020

Looks good. Did the first fix only get merged into the 1.9.3.x branch?

Yes. Looks like first one was only merged into 1.9.3.x. I have NOT tested if it works for 1.9.3.x, but 1.9.4.0 introduced a new problem (see SE link). This has been fixed too.

If you want to test it, just put 100s/1000s images into media directory.

@colinmollenhour colinmollenhour merged commit ad32107 into OpenMage:1.9.4.x Jun 4, 2020
@sreichel sreichel added the performance Performance related label Jun 4, 2020
@sreichel sreichel deleted the hotfix/wysiwyg branch June 4, 2020 20:30
@sreichel sreichel added the Component: Cms Relates to Mage_Cms label Jun 4, 2020
@sreichel sreichel added this to the Release 19.4.4 milestone Jun 26, 2020
edannenberg pushed a commit to edannenberg/magento-lts that referenced this pull request Aug 20, 2020
edannenberg pushed a commit to edannenberg/magento-lts that referenced this pull request Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Component: Cms Relates to Mage_Cms performance Performance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants