@eldk opened this Issue on December 18th 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 commented on December 18th 2018 Member

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

@eldk commented on December 18th 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 commented on December 18th 2018 Member

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

@eldk commented on December 18th 2018

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

removed.

@tsteur commented on December 18th 2018 Member

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 commented on December 18th 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 commented on December 19th 2018 Member

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 commented on December 19th 2018 Member

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 https://github.com/matomo-org/matomo/pull/13688 and https://github.com/matomo-org/matomo/issues/2956

@eldk commented on December 19th 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 commented on December 19th 2018 Member

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 commented on December 19th 2018 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 commented on December 19th 2018 Member

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 commented on December 19th 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 commented on December 20th 2018 Member

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 commented on December 20th 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 commented on December 21st 2018 Member

@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 commented on December 22nd 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 https://github.com/matomo-org/matomo/pull/13895 : back to origin title hash.

This Issue was closed on December 22nd 2018
Powered by GitHub Issue Mirror