This might be a simple question but how does one retrieve the stored records when using the "Basic Storage" content storage method?
It looks like I could write some SQL and get the information like this: SELECT * FROM eu_cookie_compliance_basic_consent; but could this information be exposed somehow to the core module "Views" for retrieval?
Thank you to all that have contributed to this helpful module.

Comments

ttamniwdoog created an issue. See original summary.

svenryen’s picture

Category: Support request » Feature request

For now the solution is to use a database tool and inspect the table.

The plan is to expose the data to views in both D7 and D8. Thanks for the reminder.

junkuncz’s picture

StatusFileSize
new2.96 KB

I attached the D8 related patch. It simply exposes its database table and also adds a relationship with the user table by uid.

If you are okay with that I'd be happy to implement the D7 version as well.

Bálint

junkuncz’s picture

StatusFileSize
new2.95 KB

Sorry it's a new file fix in the patch.

junkuncz’s picture

Status: Active » Needs review
svenryen’s picture

Thanks @junkuncz. Yes I'd be really happy to get a patch for D7 as well.

junkuncz’s picture

Alright I will manage it soon will create a new issue and link it.
Thanks!

junkuncz’s picture

Related issues: +#3073989: Views integration
StatusFileSize
new3 KB

D7 views integration added here: https://www.drupal.org/project/eu_cookie_compliance/issues/3073989
I also upload a new patch (contains tiny refacts).

Status: Needs review » Needs work

The last submitted patch, 8: retrieve_what_is_stored-3071961-08.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

junkuncz’s picture

junkuncz’s picture

Hmm I have no idea about this phpcs error, all seems good to me with the last patch:

eu_cookie_compliance.views.inc
line 1 Missing file doc comment

@edit: shit, ignore me I uploaded the wrong patch. :)

retrieve_what_is_stored-3071961-13.patch is the winner!

junkuncz’s picture

Status: Needs work » Needs review
junkuncz’s picture

StatusFileSize
new2.99 KB

Status: Needs review » Needs work

The last submitted patch, 13: retrieve_what_is_stored-3071961-13.patch, failed testing. View results

junkuncz’s picture

Status: Needs work » Needs review
svenryen’s picture

StatusFileSize
new3 KB

Looked mostly good. I changed the name and description of the view, since we're not providing a view of EU Cookie Compliance's but of the Consents.

Here's the final patch. Committing this now. Thanks for the work!

svenryen’s picture

Seems like I have to commit it later. I'm aboard a plane and the wifi seems to have only port 80 and no port 22 support for git.

junkuncz’s picture

Alright thanks for the feedback and have a good flight! :)

ttamniwdoog’s picture

@svenryen, hope you had a great flight. Could you provide a timetable for the next release of eu_cookie_compliance and if it could contain this patch? Thanks again!

  • svenryen authored 85eb811 on 8.x-1.x
    Issue #3071961 by junkuncz, svenryen, ttamniwdoog: Retrieve what is...
svenryen’s picture

Status: Needs review » Needs work
Issue tags: +ContributionWeekend2020

Looking at this patch again, it needs work.

Some fields are clearly numeric (such as uid) and the timestamp needs to be recognized as such, instead of merely a string.
I also need to make a patch for Drupal 7.

svenryen’s picture

Status: Needs work » Needs review
StatusFileSize
new3.15 KB

Here's an updated patch for Drupal 8.
Time and numeric fields are properly recognized.

It's nice if somebody can review.

svenryen’s picture

StatusFileSize
new3.42 KB

I found a better way to identify the uid field, here's an updated patch.

I'll go ahead and merge. If you spot something astray, you can reopen the issue and let me know.

  • 1d4b37a committed on 8.x-1.x
    git commit -m 'Issue #3071961 by junkuncz, svenryen, ttamniwdoog:...
  • 9928c51 committed on 8.x-1.x
    Revert "git commit -m 'Issue #3071961 by junkuncz, svenryen, ttamniwdoog...
  • c76bbcf committed on 8.x-1.x
    Issue #3071961 by junkuncz, svenryen, ttamniwdoog: Retrieve what is...
svenryen’s picture

  • 53f5a3a committed on 7.x-1.x
    Issue #3071961 by junkuncz, svenryen, ttamniwdoog: Retrieve what is...
svenryen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.