Closed (fixed)
Project:
Facebook Pixel
Version:
2.x-dev
Component:
Code (General)
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Feb 2022 at 12:48 UTC
Updated:
20 Nov 2023 at 12:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ropic commented+1 same problem
Comment #3
mach_25 commentedIt looks like the module is using a deprecated function "once".
To fix the issue without code changes add `- core/jquery.once` to dependencies in facebook_pixel.libraries.yml
And to fix the deprecated code there is a guide here https://www.drupal.org/node/3158256
Comment #4
c_archer commentedComment #5
johnnydarkko commentedThank you! The patch in #4 also fixes an issue where I was seeing errors like this appear in the console:
Patch simply adds the once library and looks good to go! Moving to RTBC
Comment #6
kaszarobertPatch #4 fixes the problem for now.
But don't forget that since Drupal 9.2 drupal/jquery.once is deprecated (https://www.drupal.org/node/3158256). So, when Drupal 10 comes, the JS needs to be rewritten to using core/once instead.
Comment #7
bas123 commentedQuick question!
If I run
composer require 'drupal/facebook_pixel:^2.0@RC'now to install this on a live Production site, has the patch been integrated, or do I need to run the patch too?Thanks!
Comment #8
c_archer commentedYou will need to run the patch manually until the maintainer merges.
Comment #9
c_archer commentedI have updated the patch to take into account the Drupal 10 changes coming to core (https://www.drupal.org/node/3158256).
Comment #10
c_archer commentedComment #11
lamp5For us #9 does not work, #4 works well.
Comment #12
proweb.ua commented#9
Uncaught SyntaxError: missing ) after argument list
https://prnt.sc/DMBjze5qMnYA
#4 works
Comment #13
anybodyCould we please have this as a cleaned up MR with the issue from #9 corrected? (see #12). Thanks!
Comment #15
anybodyThank you all very much, especially @c_archer!
I'll now commit your fix from #4 and create a new release! We should solve the Drupal 10 changes (once()) in a separate issue.
Comment #16
anybodyComment #18
anybodyWill create a 2.0.0-rc2 release now!
Comment #19
anybodyFollow-up: #3263563: Remove jQuery dependency in 2.x Please help coding! :)
Comment #21
c_archer commented