joomla-cms
joomla-cms copied to clipboard
[4.2] [GSoC 21] Cookie Manager
Summary of Changes
This PR includes a component and a plugin. The component has 4 parts:
- Adding cookies
- Adding categories
- Adding scripts
- View consents
The plugin handles all the scripts and updating consent details to the database using JavaScript.
CSS file for handling different cookie banner positions and preview button.
Testing Instructions
Installation
- Apply patch OR checkout
final-cookie-managerbranch - Update database structure
- Discover and install cookie manager component and plugin
- Build assets - do npm run build:css and npm run build:js
https://user-images.githubusercontent.com/61203226/128632910-6aa0d1e4-536b-4c19-8054-770f88e89dcf.mp4
Add categories and cookies
- Install
blog sample data(but not necessary) - Activate (or enable) the plugin
- Add categories and cookies associated with it
https://user-images.githubusercontent.com/61203226/128633463-025ba072-a46a-450d-9e85-28579c3c9942.mp4
Add scripts
https://user-images.githubusercontent.com/61203226/128634245-f0787020-1dc8-4ebb-80d1-cc0c03748dfd.mp4
Add iframes
https://user-images.githubusercontent.com/61203226/128634419-30c2537e-d5f0-4dea-a76b-bbc8c0b96508.mp4
Same for links, objects, images and embeds.
View consents
To Do
- Merge all cookies that the Cookie Manager generates to control consents per categories of cookies and the modal (pop up) visibility into a single cookie.
- Add a parameter to let the Webmaster choose which of the cookie categories will be activated on the first visit, but the user will still be able to opt-out and Additionally, we need a parameter to set one of the cookie categories as a necessary cookie category, meaning that this category should be activated by default and the user will not be able to opt-out.
Documentation Changes Required
Yes, have to add pages for the cookie manager component and plugin.
Thanks to all the people involved in this project
@apapageorgiou , @bembelimen , @chmst , @wilsonge , @jeckodevelopment , @nibra , @softforge , @richard67 and @shivamdiehard
This would be best Git Squashed before committing :) https://www.git-tower.com/learn/git/faq/git-squash/
This would be best Git Squashed before committing :) https://www.git-tower.com/learn/git/faq/git-squash/
@PhilETaylor It will be merged with a squash at the end (if nobody makes a mistake).
Drone is moaning about Code Style https://ci.joomla.org/joomla/joomla-cms/46950/1/6
FILE: /********/src/plugins/system/cookiemanager/cookiemanager.php
57s
48 ----------------------------------------------------------------------
57s
49 FOUND 4 ERRORS AFFECTING 4 LINES
57s
50 ----------------------------------------------------------------------
57s
51 37 | ERROR | Missing @var tag in member variable comment
57s
52 | | (Squiz.Commenting.VariableComment.MissingVar)
57s
53 44 | ERROR | Missing @var tag in member variable comment
57s
54 | | (Squiz.Commenting.VariableComment.MissingVar)
57s
55 59 | ERROR | Missing @var tag in member variable comment
57s
56 | | (Squiz.Commenting.VariableComment.MissingVar)
57s
57 66 | ERROR | Missing @var tag in member variable comment
57s
58 | | (Squiz.Commenting.VariableComment.MissingVar)
57s
59 ----------------------------------------------------------------------
@PhilETaylor Thank you so much for the review 😊
This would be best Git Squashed before committing :) https://www.git-tower.com/learn/git/faq/git-squash/
That's normally what we do, so yes agree 😉
Can iframes from a specific domain be actually blocked in general so you don't need to copy the exact iframe code into the cookie Manager Settings? For Germany, you need a link to imprint, privacy policy, and cookie policy in the cookie modal itself. Is it possible to scan the site for used cookies and external scripts and add them automatically as a draft to the manager? It would be really exciting to have this feature on Board, thank you so much!!!
@rjharishabh There are very likely conflicts in base.sql for the assets table, too, a nested one … you rememberer sure. Best is you go through them again.
@rjharishabh Could you update this PR and rebase it to 4.2-dev so we can include it in the Joomla 4.2 release?
Hello @rjharishabh I noticed you updated this PR with the 4.1-dev branch. As this is a new feature it needs to be based on the 4.2-dev branch. so I rebased the PR against the 4.2-dev branch.
Could you please look at the last todo items so this can be completed?
Please check and correct all the xml files so that you are only indenting with tabs and not a mix of tabs and spaces. Please remove all the size= from the xml as they dont do anything
This should be closed as its never going to be merged
This should be closed as its never going to be merged
Why?
because sadly it is unusable. sorry I should have linked to my longer report https://github.com/joomla-projects/gsoc21_cookie-manager/issues/48#issue-1268197511
Ok but that's not motivating for the creator of this project to just say "it will be never merged". I also don't understand why you say something like "On what planet were the gsoc mentors living" The mentors are there to support the student and not to write everything themselves. I think your long report is helpful but in my opinion it's also mean. Give people a chance. I was not able to test it because I have issues with getting composer to run. :-( Hope I can test it soon and also help the student to fix problems.
It should be part of the mentors role to ensure that the student is spending their time producing code that fits the purpose. I am not talking about quality of code but the actual functionality. If you read exactly what I wrote you will see that I spent two days writing 20 pull requests to address code quality before I even realised that the code itself doesnt and can not satisfy its aims. That should have been addressed a long long time ago by the mentors. 4.2 is in beta which means it is feature complete so this cannot go into 4.2 which gives enough time for it to be written correctly for 4.3. If you read exactly what I wrote you will see that the approach to solving the task will not be usable - it is that which the mentors should have spotted and addressed before enoucraging the student to carry on.
PS if you do manage to resolve your technical issues then you should test the code from https://github.com/joomla-projects/gsoc21_cookie-manager/tree/final-cookie-manager as it is more upto date than the code here in this PR
PPS fairly certain that when you try the code you will see it doesnt try to do what you think it will and that your clients would never be able to use it
This pull requests has been automatically converted to the PSR-12 coding standard.
There reaally is no point in this outdated pr staying open
This pull request has been automatically rebased to 5.0-dev.
Successful installation, but incorrect operation with automatic category creation each time you click (Save and Close).

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35278.
This pull request has been automatically rebased to 5.1-dev.
This pull request has been automatically rebased to 5.2-dev.