Closed (outdated)
Project:
Google Analytics
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Jun 2015 at 12:41 UTC
Updated:
6 Jul 2023 at 17:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
LKS90 commentedHere is a patch. I'm not sure if it really is an equivalent. Seems like it used to show more detailed information.
Comment #2
hass commentedThis is an incorrect change.
We do not like to look for the messages visible to a user. We need to verify if the *tracking code* is shown.
Comment #3
LKS90 commentedQuick search in the source for ga( and I found it.
Comment #4
LKS90 commentedComment #5
hass commentedWhat bullshit patch has changed the text to these useless error messages??? This errors will not explain a user what gone wrong and how I'm able to solve the form error.
Comment #6
hass commentedI've tested this on simplytest.me, but it is not what we want.
We need the message text in google analytics - not the error counter and field list that has errors.
It looks like this text is now shown below the field that contains the error.
Comment #7
LKS90 commentedI'm more confused than before now. Besides the ga('send', ...) with the Error messages, there is nothing on the page related to google analytics. Do you expect some (hidden?) field under the "Username/password field is required"?
Edit: Looks like #2 confused me, an assertText for the 'Username/Password field is required.' like in the first patch plus the line from the second patch seems like all the information we would want at that point, maybe also extend the assertRaw to also include the tracking code, but otherwise I don't get what the test should be testing.
Comment #8
hass commentedSorry for confusion.
We need the "Username/Password field is required." (or how it is spelled today) error message that is now shown below the username form field. This string need to be added inside the ga event tracking code.
You may compare to D7 if it is now confusing... It has been broken by core in last 1-2 weeks.
Comment #9
LKS90 commentedThe issue that broke the test: https://www.drupal.org/node/1493324
The form-error-messages aren't returned by drupal_get_messages though. I don't know how I should get the specific error messages to send, they are attached to the elements on form validation using the form_state.
Comment #10
LKS90 commentedAlright, patch 3 fixes the test fail.
If you want to track the Username/Password is required information with google analytics, create a new issue and try and implement it. As I said, drupal_get_messages() doesn't treat this as a (form-error/error/message) error so you can't really know exactly what's wrong with the Username and password when sending the error message to google analytics.
I'd just like to get the test fixed and save adding new functionality for a separate issue.
Comment #11
LKS90 commentedComment #12
hass commentedWe are not adding new functionality. This is an old feature and if we do not get the error message the old feature is broken. We need to repair this and I do not like to remove the feature. Your change fixes the test, but the feature is still broken.
Comment #13
LKS90 commentedTrue, but committing this and moving on to the next issue that focuses on the field errors is probably easier and we can actually get something done instead of discussing things :P.
Here is an issue that properly describes the current problem. I'll edit this issue to reflect that less information is provided at the moment and that the test is now passing.
Comment #14
LKS90 commentedHere is a second version without the line removal, just in case... :D
Comment #15
hass commentedThis suxxx
Comment #16
LKS90 commentedHere is a patch with the code above added (and some documentation for it), feedback welcome (german is also possible :P). The test passes and the other error message is gone. Also changing the issue title to match what this patch does.
Comment #17
hass commentedMerged the preprecess functions and merged the drupal_get_messages() with the form messages. Fully untested.
It would be good if core is able to provide the form errors with a function.
Comment #18
hass commentedMissed to change one function name.
Comment #21
hass commentedBUGs:
Comment #22
hass commentedThis fixes the not cleared messages issue.
It looks like the
drupal_get_messages(NULL, FALSE)is now broken inhook_page_attachments()and does not return anything.Comment #23
hass commentedThe inline patch #2578561: Move "Inline Form Errors" functionality to optional module and restore D7-style form errors by default has been roled back.
We are back to D7 behaviour and the code works again. The feature is now moved to contrib and may come in again in 8.1 or later. Therefore postponed on Drupal 8.1 or later
Comment #24
tim.plunkettIt wasn't moved to contrib, it is still in core as an optional, "experimental" module. You're right that it won't be back until 8.1 or later though.
Comment #25
mgiffordSo if this "experimental" module is enabled, how will Google Analytics or other contrib modules function? Should modules be coded to work with both? I don't know how much will be different for contrib.
Note, I haven't really had time to look at what was done in Core in the last 5 days.
Comment #26
hass commentedThe feature may need to be removed completly. With html5 form validation the browser manages the validation and drupal do not get notified. As browsers do not run a callback we are totally blind to what type of form errors happend. That is really bad, but I'm not aware of any reliable workaround :-(
Comment #27
mgiffordOk, so now that this module has an RC1, does this error still show up when the experimental inline errors module is enabled?
I'm not sure where to look for it. Steps to reproduce it would be terrific.
Comment #28
hass commentedThe sh** got into core now. Unpostponing, but no idea how we may ever fix it if the browser only does form validation and does not interact with the website.
Comment #29
japerryWith the sunset of legacy google analytics, the 8.x-2.x module is now unsupported. If this is still an issue with the 4.x version, please file a new issue in the queue.