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

Actions_SubmenuPageTitles : two lines in report for same page title #13880

Closed
eldk opened this issue Dec 18, 2018 · 17 comments · Fixed by #13895
Closed

Actions_SubmenuPageTitles : two lines in report for same page title #13880

eldk opened this issue Dec 18, 2018 · 17 comments · Fixed by #13895
Assignees
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone

Comments

@eldk
Copy link

eldk commented Dec 18, 2018

Hello,

Page "Actions_SubmenuPageTitles" begin to display two lines in report for same page.

Each line have columns "Pageviews ..." with different numbers.

"Open Transitions" and "Open Raw Evolutions" gives same datas for the two lines.

First seen on a domain with one page from which title have not been modified and no change at all on server.

Matomo version was 3.8.0-b4. I have upgraded to 3.8.0-b5 : no change : one page title gives two lines in report.

It's happened on a second domain with more pages too.

It's look like something change past some event or date as ?

Thanks,

Eric

@tsteur
Copy link
Member

tsteur commented Dec 18, 2018

Can you post a screenshot maybe to clarify what you mean by "two lines for same page". Does the title maybe include a /?

@eldk
Copy link
Author

eldk commented Dec 18, 2018

Yes,

I think it's related to 3.8.0-b4 as I upgrade to it on 12 december.

screenshot

I have removed the page title, but it is the same. It's a one page site.

Does the title maybe include a /?

There is some - but no /

For another website and same Matomo, some "double line" title have no special characters at all.

For this other website, it's only for page that have been visited beyond the twelve of december and today.

@tsteur
Copy link
Member

tsteur commented Dec 18, 2018

Could you paste the exact titles? Feel free to change the letters... Are there maybe any extra spaces in the middle or something?

@eldk
Copy link
Author

eldk commented Dec 18, 2018

One link to the one page website ( The one from the screenshot) :

removed.

@tsteur
Copy link
Member

tsteur commented Dec 18, 2018

OK thanks. Maybe you could email us an image of the two titles to hello at matomo.org just to get a better understanding. Feel free to remove the link again.

@eldk
Copy link
Author

eldk commented Dec 18, 2018

The mail has been sent.

I just had some datas to one Android app tracked with matomo-android-sdk , stats are public, the same thing happened.

https://domain.tld/index.php?module=CoreHome&action=index&idSite=5&period=year&date=today#?idSite=5&period=year&date=today&category=General_Actions&subcategory=Actions_SubmenuPageTitles

@tsteur
Copy link
Member

tsteur commented Dec 19, 2018

Cheers for sending the mail 👍 I've tried to reproduce by tracking it first with Matomo 3.7.0 and then with Matomo 3.8.0-b5 but didn't run into the problem. Thanks though for sending the link and I can now see the issue. There is one entry with a leading space, and another without... Makes me realise this might only happen when period != day.

I remember when a delimiter is set, it may add a space here https://github.com/matomo-org/matomo/blob/3.8.0-b5/plugins/Actions/ArchivingHelper.php#L468-L477 but don't quite understand the problem.

and thought that https://github.com/matomo-org/matomo/compare/3.x-dev...13880?quick_pull=1 might fix the issue but not sure if this would have any side effects.

@diosmosis @mattab @sgiehl do you maybe know why exactly the whitespace is prepended?

@tsteur
Copy link
Member

tsteur commented Dec 19, 2018

Note: putting this into 3.8.0 to look at it as it may or may not be considered a regression. It was expected there would be a difference when the title contains / but wasn't thinking it would regress when it contains a -. @eldk any chance you have set a custom action title delimiter of -?

refs #13688 and #2956

@tsteur tsteur added this to the 3.8.0 milestone Dec 19, 2018
@eldk
Copy link
Author

eldk commented Dec 19, 2018

any chance you have set a custom action title delimiter of -?

No, I haven't set any custom title delimiter.

This happened too with page title without any special character.

For example a two words title : Foo Bar

and the same with one word title like arenicoles :

  • It's OK in General_Pages :

https://domain.tld/index.php?module=CoreHome&action=index&idSite=5&period=year&date=today#?idSite=5&period=year&date=today&category=General_Actions&subcategory=General_Pages

  • it's KO in Actions_SubmenuPageTitles

https://domain.tld/index.php?module=CoreHome&action=index&idSite=5&period=year&date=today#?idSite=5&period=year&date=today&category=General_Actions&subcategory=Actions_SubmenuPageTitles

@tsteur
Copy link
Member

tsteur commented Dec 19, 2018

Cheers 👍 I can see this might be an issue for all pages...

so maybe a fix like this could be more appropriate where we still keep prepending the whitespace https://github.com/matomo-org/matomo/compare/3.x-dev...13841_2?quick_pull=1 ... it's a bit funny but might be the safest fix. Still not understanding why we prepend titles with a whitespace.

@diosmosis
Copy link
Member

@tsteur Is the whitespace important or can it be removed? Would using a GroupBy filter w/ trim($label) in the Actions API work?

@tsteur
Copy link
Member

tsteur commented Dec 19, 2018

That's what I thought and did in https://github.com/matomo-org/matomo/compare/3.x-dev...13880?quick_pull=1 but thinking it could break something? Trying to understand when that whitespace is important :)

@eldk
Copy link
Author

eldk commented Dec 19, 2018

Hello,

  • With Matomo 3.8.0-b4 :

"Open Transitions" and "Open Raw Evolutions" gives same datas for the two lines.

and reported numbers were accurate - total pageviews number is the total pageviews for the chosen period, datas previous to 3.8.0-b4 upgrade included .

  • With Matomo 3.8.0-b5

"Open Transitions" and "Open Raw Evolutions" gives same datas for the two lines.

but reported numbers are not accurate - total pageviews number is the total pageviews since Matomo 3.8.0-b4 upgrade - previous datas are not reported in the total pageviews number.

To repro :

  • Use Matomo 3.8.0-b4
  • Use a period or date range that include datas collected before Matomo 3.8.0-b4 upgrade.
  • Check numbers in Actions_SubmenuPageTitles > "Open Transitions"
    => the reported numbers are accurate for chosen period
  • Upgrade to Matomo 3.8.0-b5
  • Use a period or date range that include datas collected before Matomo 3.8.0-b4 upgrade.
  • Check numbers in Actions_SubmenuPageTitles and go to "Open Transitions"
    => the reported numbers are only those since 3.8.0-b4 upgrade

The same thing happened as soon as you look at "Open Transitions" in a all reports pages (Pages, Entry Pages ...).

Archiving is only done with a CRON task. It's disabled for browser view.

Matomo 3.8.0-b5 - Page Titles report - Two lines for same title and pageviews number since 3.8.0.b4 upgrade :
screenshot-2

Matomo 3.8.0-b5 - Pages report - Accurate pageviews in report but pageviews number since 3.8.0.b4 upgrade :
screenshot-3

@mattab
Copy link
Member

mattab commented Dec 20, 2018

Trying to understand when that whitespace is important :)

This was a long time ago, but the comment helps me remember why, if we didn't put the whitespace in, then somehow if you have the following 2 requests:

  • /some-path
  • /some-path/

They would be both aggregated under the same (maybe under some-path/ but not sure),
but we do want to keep them different since /some-path will show as some-path while /some-path/ will show as some-path (directory) -> / where the page is / and some-path appears as a clickable directory.

Sorry it's probably not very clear but maybe if you remove and try to run the tests they would fail? (hoping that tests test for this)

@eldk
Copy link
Author

eldk commented Dec 20, 2018

I've tryed https://github.com/matomo-org/matomo/compare/3.x-dev...13841_2?quick_pull=1

Datas are added to origin line (the one that exist before 3.8.0-b4). Back to origin title hash ?

But second "new line" is still there. New title hash ?

@tsteur tsteur self-assigned this Dec 21, 2018
@tsteur tsteur added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Dec 21, 2018
@tsteur
Copy link
Member

tsteur commented Dec 21, 2018

@eldk not sure what you mean by "Back to origin title hash ?" and "New title hash"?

If it still appears there's a good chance you may need to invalidate some report data see https://matomo.org/faq/how-to/faq_155/ If you can access the server you can for example execute a command like ./console core:invalidate-report-data --dates=2018-12-01,2018-12-22 otherwise you can also use the HTTP API. The data might only become available correctly after the next archiving run depending on whether this is done by a cron job or through browser.

@eldk
Copy link
Author

eldk commented Dec 22, 2018

@tsteur : thanks, it's ok (with your PR applyed and datas reprocessed).

And titles with / are not cut anymore.

not sure what you mean by "Back to origin title hash ?" and "New title hash"?

origin title hash = title hash before 3.8.0-b4
new title hash = title hash after 3.8.0-b4

With your PR #13895 : back to origin title hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants