-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Segment cannot be added because no sql segment is set - in plugin Goals #15208
Comments
@vmalaga do you know if you have any custom configs set in select definition from matomo_segment You may need to change The messages re the unexpected websites we can probably look into as we maybe mark them as to be reprocessed even though the idsite doesn't exist but can't really imagine it would do that. We will need to investigate that. Could you let us know which version of Matomo you are on? |
@tsteur this is the content of matomo_segment table
and this is the matomo_site where you can see that we have only 1 site
|
@vmalaga just checking are you using the latest version of Matomo? Did this happen after an update? |
Any chance you deleted a custom dimension recently maybe or made changes to it? |
@tsteur we are using now matomo 3.13.0, but this happends since 2 versions ago. The problem appeared one day checking the logs of archiver after being notified that there were no statistics. trying to solve the problem, I tried to delete all archive tables, delete all segments and all rows on And about the dimensions, I see that there are records in that table with |
@tsteur What is the reason for not having foreign keys in the tables that use |
@vmalaga Myisam didn't support foreign keys which was used initially. In general we're not really wanting to use foreign keys though anyway as it's not really needed and they don't have that many advantages in the end. Be great to let us know if it fixes the issue. So far I can only imagine that maybe a custom dimension was deleted but a segment definition exists using that dimension and we're not dealing with this yet maybe. |
Hi @tsteur no the issue has not been fixed, even deleting all records with |
Could you temporarily disable each segment one after another until the issue resolves to find out which one is causing it? Also could you check which custom dimensions are active for idsite1? |
I'm having the same error message on a fresh installation of Matomo 4.5.0 without any custom plugins, one site and no tracking in it yet. The matomo_segment table is empty, but still I get that error message:
This happens on https://analytics.example.com/index.php?module=CoreHome but I can manually go to https://analytics.example.com/index.php?module=CoreAdminHome without a problem. |
@jurgenhaas Are you maybe able to see a stack trace for that error in the error log? That might help to figure out where that problem actually is triggered. |
Hmm, when calling the crashing site, nothing is shown in the log. But the error.log is full of records like this:
This is when I'm looking into the Apache log files. Are there any other logs by Matomo elsewhere? |
When I run
|
I had to deactivate the plugins Goals, Provider and VisitFrequency - then I activated them again and the archive console command now runs without a problem. But the original error when using the web interface still exists. |
Ok. that points out, that the problem is triggered here: matomo/plugins/Goals/Archiver.php Line 121 in 3efc65b
So it seems the visitorType segment produced the problem, which is a bit weird, as that segment actually is defined in CoreHome plugin and should always be valid. I really don't know why that might happen upon a fresh install. Maybe @tsteur has an idea?
|
@sgiehl Looking at the stack trace there's a problem here: https://github.com/matomo-org/plugin-CustomVariables/blob/4.0.1/Columns/Base.php#L45-L57 These segments don't define sqlSegment but instead use a union of segments. It seems This would happen when for some reason custom variable columns weren't installed. We should try to reproduce this with a fresh install |
Although next release won't include custom variables anymore anyway and then it will be only a plugin on the marketplace. So this might be solved then. |
So, is there a way to re-install the instance without CustomVariables? |
Oh, I have just deactivated the CustomVariables plugin and the site is now working. |
👍 from Matomo 4.6 CustomVariables will also no longer be included by default. I'm glad it's now working @jurgenhaas Let us know if there's another issue. I'll close it meanwhile as it should be fixed with the next release. |
Hi
We have a matomo installation and we are receiving these error messages in the process core:archive
also although we have 1 idsite only, motivated by an error on our part, records were inserted in the db different from idsite = 1 and when running the file, these messages come out
I have delete this record from db tables
matomo_log_*
but the messages still appear and i think this is the reason for the error during the archiving process.How can I clean the db to remove the entire trace of those idsites?
The text was updated successfully, but these errors were encountered: