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
Add possibility to manage and view Intranet websites #13473
Conversation
@@ -65,11 +65,6 @@ class Visit implements VisitInterface | |||
*/ | |||
protected $visitProperties; | |||
|
|||
/** |
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.
wasn't used...
FYI: Currently no site values will be saved except for trust cookies... need to figure out a way to make this happen |
Feedback:
|
Also
|
I'll remove the setting again. must have misunderstood this one. |
Removed the setting again and all related tests. Makes it easier :) Added tests for the tracking part, should work. |
Forgot to reread the description so had missed this. But better we take the simplest approach 👍 |
} elseif ($this->didEnableSetting) { | ||
// we reset it in case of bulk tracking with different sites etc | ||
$this->setTrustCookiesSetting(0); | ||
$this->didEnableSetting = true; |
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.
I might be wrong, but I'm not sure this is needed? Could just use an else and unset it if it's not intranet.
Or is it in case another plugin decides to unset it? Actually, won't this ignore the config value then when setting it back?
"IntranetMeasurable": { | ||
"Intranet": "Intranet", | ||
"Intranets": "Intranets", | ||
"IntranetDescription": "An intranet measurable is just like a website but hosted on an internal network." |
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.
Since an intranet is the actual internal network, do you think "Intranet Website" might be a better term to use?
Made the changes, will likely need to fix the tests after this |
$this->didEnableSetting = true; | ||
} elseif ($this->didEnableSetting) { | ||
// we reset it in case of bulk tracking with different sites etc | ||
$this->setTrustCookiesSetting(0); |
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.
Was actually thinking about this line. If [General] trust_visitors_cookies
is set to 1, then this will undo that setting, right?
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.
only if we enabled it before, which we wouldn't have in this case when it is already enabled in https://github.com/matomo-org/matomo/pull/13473/files#diff-74231b57ce12fbc00990b9d88e26426dR26
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.
Ok, gotcha, missed the DI get
Looks like there are some integration test failures. The JsProxyTest one passes for me locally... |
I'll restart the cancelled PR builds |
Locally the test works for me as well |
Test is still failing on travis, locally works. not sure why. |
@diosmosis @mattab @sgiehl do you know why this test would check for url fails probably because of a missing htaccess or so? Not sure why it suddenly fails... maybe changing to |
@tsteur did you find out what the whole error was (ie, why it was getting a 400)? |
Nope not yet. I'll enable debugging and see what happens |
@diosmosis test should be fixed now |
@tsteur there are some QueuedTracking tests still failing, doesn't look expected. Maybe something breaks tracking for queued tracking? |
@diosmosis should be fixed now |
* Add possibility to manage and view Intranet websites matomo-org#7724 * more tweaks * ui tests * fix some tests * added missing name * remove intranet setting, added test for tracking * fix various tests * remove test * Update RequestProcessor.php * Update en.json * fix some tests * do not throw exception if site does not exist * seeing just now it is fine to trigger exception * debug error * log only certain requests * Update piwik.php * Update JsProxyTest.php * trying to fix tests * remove debug code * trying to fix tests
@mattab is this what you had in mind?
need to see how to write tests for it.
fix #7724