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

An Exception is thrown and logged if file is not found while merging #2445

Merged
merged 2 commits into from
Sep 7, 2022
Merged

An Exception is thrown and logged if file is not found while merging #2445

merged 2 commits into from
Sep 7, 2022

Conversation

fballiano
Copy link
Contributor

If css/js merging is enabled but one of the files doesn't exist on the file system, the merging was re-done at every request, as explained in #874

This should be avoided and an exception should be logged.

On line 837 of app/code/core/Mage/Core/Helper/Data.php all the exceptions are logged and I've added that message (with the comment above) to be consistent with the rest of the code.

@github-actions github-actions bot added the Component: Core Relates to Mage_Core label Aug 17, 2022
Sdfendor
Sdfendor previously approved these changes Aug 18, 2022
@addison74 addison74 linked an issue Aug 18, 2022 that may be closed by this pull request
addison74
addison74 previously approved these changes Aug 18, 2022
tmewes
tmewes previously approved these changes Aug 18, 2022
@sreichel sreichel dismissed stale reviews from tmewes, addison74, and Sdfendor via a278128 August 18, 2022 22:44
tobihille
tobihille previously approved these changes Aug 19, 2022
Sdfendor
Sdfendor previously approved these changes Aug 19, 2022
tmewes
tmewes previously approved these changes Aug 19, 2022
addison74
addison74 previously approved these changes Aug 19, 2022
@sreichel
Copy link
Contributor

sreichel commented Aug 28, 2022

What i have to do, to trigger this error?

I've eanbled css/js-merging, deleted a few files (that should be merged?!?), cleared cache ...

@fballiano
Copy link
Contributor Author

I don't know, I've just put that issue into code 😅

@fballiano fballiano requested review from tobihille, Sdfendor, addison74 and tmewes and removed request for tobihille, Sdfendor and tmewes September 7, 2022 10:01
@fballiano fballiano requested review from kiatng, Sdfendor, tmewes and elidrissidev and removed request for tobihille, Sdfendor and tmewes September 7, 2022 10:01
addison74
addison74 previously approved these changes Sep 7, 2022
Sdfendor
Sdfendor previously approved these changes Sep 7, 2022
@elidrissidev
Copy link
Member

@sreichel I tested it, if a file is not found the error is caught and logged to var/log/exception.log.

@fballiano fballiano merged commit 10704a1 into OpenMage:1.9.4.x Sep 7, 2022
@fballiano fballiano deleted the issue_874 branch September 7, 2022 15:19
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2022

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
7 runs  ±0  5 ✔️ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 10704a1. ± Comparison against base commit 32d1591.

@addison74
Copy link
Contributor

Lately there are more and more tests that fail for PHP Stan - .github/phpstan.neon. For this PR the error is the following

Error: Cannot call method addTitleToResult() on Mage_Core_Model_Resource_Db_Collection_Abstract|false.
 ------ -------------------------------------------------------- 
  Line   Catalog/Model/Resource/Product/Option/Collection.php    
 ------ -------------------------------------------------------- 
  152    Cannot call method addTitleToResult() on                
         Mage_Core_Model_Resource_Db_Collection_Abstract|false.  
 ------ --------------------------------------------------------

Is it a problem that we merged it without fixing this error?

@elidrissidev
Copy link
Member

Is it a problem that we merged it without fixing this error?

Already fixed in another pending PR.

@fballiano
Copy link
Contributor Author

I think it started with #2562, #2572 should fixes it but I'm also trying to understand why it generated, which i still don't know

@fballiano
Copy link
Contributor Author

found it now :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Relates to Mage_Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Review mergeFiles logic in case of missing file
7 participants