joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[4.2] [GSoC 21] Cookie Manager

Open rjharishabh opened this issue 4 years ago • 17 comments

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

  1. Apply patch OR checkout final-cookie-manager branch
  2. Update database structure
  3. Discover and install cookie manager component and plugin
  4. 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

  1. Install blog sample data (but not necessary)
  2. Activate (or enable) the plugin
  3. 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

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

rjharishabh avatar Aug 21 '21 11:08 rjharishabh

This would be best Git Squashed before committing :) https://www.git-tower.com/learn/git/faq/git-squash/

PhilETaylor avatar Aug 21 '21 11:08 PhilETaylor

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).

richard67 avatar Aug 21 '21 11:08 richard67

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 avatar Aug 21 '21 15:08 PhilETaylor

@PhilETaylor Thank you so much for the review 😊

rjharishabh avatar Aug 21 '21 15:08 rjharishabh

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 😉

bembelimen avatar Aug 21 '21 16:08 bembelimen

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!!!

coolcat-creations avatar Dec 09 '21 16:12 coolcat-creations

@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.

richard67 avatar Jan 02 '22 10:01 richard67

@rjharishabh Could you update this PR and rebase it to 4.2-dev so we can include it in the Joomla 4.2 release?

roland-d avatar Jan 30 '22 18:01 roland-d

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?

roland-d avatar Feb 16 '22 19:02 roland-d

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

brianteeman avatar Feb 16 '22 19:02 brianteeman

This should be closed as its never going to be merged

brianteeman avatar Jun 14 '22 19:06 brianteeman

This should be closed as its never going to be merged

Why?

coolcat-creations avatar Jun 14 '22 19:06 coolcat-creations

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

brianteeman avatar Jun 14 '22 19:06 brianteeman

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.

coolcat-creations avatar Jun 15 '22 13:06 coolcat-creations

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

brianteeman avatar Jun 15 '22 13:06 brianteeman

This pull requests has been automatically converted to the PSR-12 coding standard.

joomla-bot avatar Jun 27 '22 21:06 joomla-bot

There reaally is no point in this outdated pr staying open

brianteeman avatar Sep 09 '22 17:09 brianteeman

This pull request has been automatically rebased to 5.0-dev.

HLeithner avatar May 02 '23 16:05 HLeithner

Successful installation, but incorrect operation with automatic category creation each time you click (Save and Close). screen shot 2023-08-26 at 09 35 26


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35278.

Magnytu2 avatar Aug 26 '23 09:08 Magnytu2

This pull request has been automatically rebased to 5.1-dev.

HLeithner avatar Sep 30 '23 22:09 HLeithner

This pull request has been automatically rebased to 5.2-dev.

HLeithner avatar Apr 24 '24 09:04 HLeithner