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
API and Tracking configuration - check that the options exist #8937
API and Tracking configuration - check that the options exist #8937
Conversation
4e75fd7
to
fa313b6
Compare
Codecov Report
@@ Coverage Diff @@
## 3.0 #8937 +/- ##
=========================================
Coverage 35.24% 35.24%
- Complexity 27908 27916 +8
=========================================
Files 1731 1731
Lines 96457 96459 +2
=========================================
+ Hits 33995 34001 +6
+ Misses 62462 62458 -4
|
Testing this locally on 3.0 and am able to enable the API and basic auth error free - maybe I am misunderstanding the test instructions? Here's a quick screencast: https://youtu.be/a0TLv8L_rLQ |
@RCheesley I've update steps to reproduce and step to tests. |
Thanks for the information - applied the gist as directed, field is hidden exactly as you describe, but no error (have not applied this PR): https://youtu.be/gKsyq0tywLA |
@RCheesley the error is just on dev mode, because it's just PHP notice. Try look to logs, there should be notice about that error |
Thanks so much for the extra detail. I followed those steps but the following error is thrown if I try to enable the API (while the basic auth setting is disabled) so maybe something else is needing attention?
Here's a screencast: https://youtu.be/6Rgz0MdRcSY |
@RCheesley It's the same error. Just patch and see should working now |
As demonstrated in the recording, this is happening with the PR applied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm the bug exists:
- Copy your Gist file to
app/config/security_local.php
- Cleared cache
- Opened
MAUTIC_URL/index_dev.php
- Clicked Configuration in the menu bar; the following alert showed up:
Then applied this PR and repeated the steps above:
- Applied this PR
- Cleared cache for both prod and dev
- Opened
MAUTIC_URL/index_dev.php
- Clicked Configuration in the menu bar
- Basic auth setting is hidden as expected:
@RCheesley could it be that you didn't clear cache in between? Especially after changing config files, clearing cache is crucial
The issue I had occurs when changing the state of the API switch and then saving, after the patch is applied. Whizz forward to 4.16 in this recording: https://youtu.be/17NojSpSq6Y |
@RCheesley I think you didn't patch correctly. Can you check If changes were applied in app/bundles/ApiBundle/Form/Type/ConfigType.php? |
It's the same improvement like John did here #6701 |
@dennisameling could you test this one including saving the setting change? I am still seeing the error and I have definitely pulled using the GH CLI, cleared the cache and still see the error after saving the configuration change. |
@RCheesley just tested and I'm also getting the error, but only when using the dev environment. Looks like
@kuzmany would you mind making that change? Thanks!! |
Travis tests have failedHey @kuzmany, TravisBuddy Request Identifier: cdf34830-bdfd-11ea-a595-8f8781864445 |
Travis tests have failedHey @kuzmany, TravisBuddy Request Identifier: eff4b290-be00-11ea-a595-8f8781864445 |
Close & open for Travis |
Thanks for making those changes @kuzmany - confirm that the behaviour is as expected without the errors! 🎉 |
Travis tests have failedHey @kuzmany, TravisBuddy Request Identifier: 8ef99cd0-bf9f-11ea-8212-0f9c14daf924 |
@kuzmany looks like Travis is reporting some issues - can you take a look at the failed build report? |
f594248
to
8b2b44c
Compare
@kuzmany I wrote a simple test for this case so that it should keep working as expected in the future. This will also ensure that the test coverage doesn't decrease because of this PR 😊 Without the PR applied, the test will fail:
After applying this PR, the test will pass:
|
Please be sure you are submitting this against the staging branch.
Description:
If we want hide some configuration from API settings, It crash with error. This PR fixed it
Steps to test this PR:
Or
Steps to reproduce this issue:
Then patch and test again
Try save configuration if everything works properly.