Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project overview
  • Repository
  • Issues 291
  • Merge Requests 39
  • CI / CD
  • Security & Compliance
  • Packages
  • Wiki
  • Snippets
  • Members
  • Collapse sidebar
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !384

Open
Opened 1 month ago by Ben Hayward@benhayward.ben
Report abuse

[Sprint/QuietQuail](fix): Blog & media edit updated to new nsfw system #1936

Closes front#1936

Depends on front!613

Testing

Go to a blog, make it nsfw. Upload an image, click it, edit - make that nsfw too.

Check that when you open them they are NSFW. They will likely not be NSFW on feeds due to #1043

This needs repeating for images, video, reminds, in groups etc (have all worked for me)

Edited 4 weeks ago by Ben Hayward
Request to merge fix/blog-media-nsfw-update-1936 into master
The source branch is 4 commits behind the target branch
Open in Web IDE
Pipeline #100701650 passed for 5a510bff on fix/blog-media-nsfw-update-1936
          Requires 3 more approvals from Devs, Deployers, and QA.
          Guy Thouret
          Guy Thouret
          Marcelo Rivera
          Marcelo Rivera
          Emiliano Balbuena
          Emiliano Balbuena
          Mark Harding
          Mark Harding
          Martin Santangelo
          Martin Santangelo
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Closes front#1936

          Mentions #1043

          Deletes source branch

          • Discussion 11
          • Commits 17
          • Pipelines 15
          • Changes 9
          2/5 threads resolved
          • Ben Hayward @benhayward.ben added MR::Awaiting Review Squad::Yellow scoped labels 1 month ago

            added scoped labels

          • Ben Hayward @benhayward.ben changed the description 1 month ago

            changed the description

          • Ben Hayward @benhayward.ben mentioned in merge request front!613 1 month ago

            mentioned in merge request front!613

          • Ben Hayward @benhayward.ben added 6 commits 1 month ago

            added 6 commits

            • c58d6ffc...4d188166 - 4 commits from branch master
            • 14a2be02 - Merge branch 'master' of gitlab.com:minds/engine into fix/blog-media-nsfw-update-1936
            • 1825a459 - Blog to activity propegation fix.

            Compare with previous version

          • Ben Hayward @benhayward.ben marked as a Work In Progress 1 month ago

            marked as a Work In Progress

          • Ben Hayward @benhayward.ben added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label 1 month ago

            added scoped label and automatically removed label

          • Ben Hayward @benhayward.ben added 1 commit 4 weeks ago

            added 1 commit

            • 51de081b - Fixed up

            Compare with previous version

          • Ben Hayward @benhayward.ben unmarked as a Work In Progress 4 weeks ago

            unmarked as a Work In Progress

          • Ben Hayward @benhayward.ben changed the description 4 weeks ago

            changed the description

          • Ben Hayward @benhayward.ben added MR::Awaiting Review scoped label and automatically removed MR::Requires Changes label 4 weeks ago

            added scoped label and automatically removed label

          • Ben Hayward @benhayward.ben added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label 4 weeks ago

            added scoped label and automatically removed label

          • Ben Hayward @benhayward.ben added 1 commit 4 weeks ago

            added 1 commit

            • d58012e8 - Fixed bug with SFW media

            Compare with previous version

          • Ben Hayward @benhayward.ben added MR::Awaiting Review scoped label and automatically removed MR::Requires Changes label 4 weeks ago

            added scoped label and automatically removed label

          • Ben Hayward @benhayward.ben added 1 commit 4 weeks ago

            added 1 commit

            • ecb84755 - Lint

            Compare with previous version

          • Mark Harding @markeharding assigned to @xander-miller 4 weeks ago

            assigned to @xander-miller

          • Mark Harding
            Mark Harding @markeharding · 4 weeks ago
            Owner

            @xander-miller please give approval when you are happy with this.

          • Xander Miller @xander-miller approved this merge request 2 weeks ago

            approved this merge request

          • Xander Miller @xander-miller unapproved this merge request 2 weeks ago

            unapproved this merge request

          • Xander Miller @xander-miller approved this merge request 2 weeks ago

            approved this merge request

          • Ben Hayward @benhayward.ben added 1 commit 2 weeks ago

            added 1 commit

            • 315c1c92 - Update Image.php

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 2 weeks ago

            added 1 commit

            • 7c02251e - Lint

            Compare with previous version

          • Xander Miller @xander-miller approved this merge request 2 weeks ago

            approved this merge request

          • Mark Harding
            Mark Harding @markeharding · 2 weeks ago
            Owner

            I am unable to test as I have a 500 error.

            [19-Nov-2019 09:49:30] WARNING: [pool www] child 10 said into stderr: "NOTICE: PHP message: Exception #1574156970: Error: Call to a member function getContext() on boolean in /var/www/Minds/front/dist/en/index.php:4"
            [19-Nov-2019 09:49:30] WARNING: [pool www] child 10 said into stderr: "Stack trace:"
            [19-Nov-2019 09:49:30] WARNING: [pool www] child 10 said into stderr: "#0 /var/www/Minds/engine/Core/I18n/I18n.php(123): include()"
            [19-Nov-2019 09:49:30] WARNING: [pool www] child 10 said into stderr: "#1 /var/www/Minds/engine/Core/Router.php(166): Minds\Core\I18n\I18n->serveIndex()"
            [19-Nov-2019 09:49:30] WARNING: [pool www] child 10 said into stderr: "#2 /var/www/Minds/engine/index.php(9): Minds\Core\Router->route()"
            [19-Nov-2019 09:49:30] WARNING: [pool www] child 10 said into stderr: "#3 {main}"
            127.0.0.1 -  19/Nov/2019:09:49:30 +0000 "GET /index.php" 500
            
          • Mark Harding @markeharding added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label 2 weeks ago

            added scoped label and automatically removed label

          • Ben Hayward @benhayward.ben added 61 commits 2 weeks ago

            added 61 commits

            • 7c02251e...52a592b9 - 59 commits from branch master
            • 7cedf6a3 - Merge branch 'master' of gitlab.com:minds/engine into fix/blog-media-nsfw-update-1936
            • cf9b88dc - Merge branch 'master' of gitlab.com:minds/engine into fix/blog-media-nsfw-update-1936

            Compare with previous version

          • Ben Hayward
            Ben Hayward @benhayward.ben · 2 weeks ago
            Developer

            Pulled in master, should reset the backend and resolve that.

          • Xander Miller
            Xander Miller @xander-miller · 2 weeks ago
            Developer

            @markeharding test sandbox is back up. You can try reviewing again.

          • Ben Hayward @benhayward.ben added 1 commit 2 weeks ago

            added 1 commit

            • d888d9c9 - Fixed breaking media and blogs

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 1 week ago

            added 1 commit

            • 4f78a38e - Updated to support old-style mature flagged blogs

            Compare with previous version

          • Ben Hayward @benhayward.ben added MR::Awaiting Review scoped label and automatically removed MR::Requires Changes label 1 week ago

            added scoped label and automatically removed label

          • Brian Hatchet :speech_balloon: @brianhatchet approved this merge request 1 week ago

            approved this merge request

          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet · 1 week ago
            Developer

            I tested this with Ben's latest changes and am pleased to report it works. I can edit a blog, mark it NSFW and have it propagate changes. On Monday, we'll get it up on of the Beatles servers and give it a proper test with live data.

          • Xander Miller @xander-miller approved this merge request 1 week ago

            approved this merge request

          • Xander Miller
            Xander Miller @xander-miller · 2 days ago
            Developer

            Hi @markeharding, during yellow squad meeting today, we heard you have some concerns about the NSFW changes. I think that is in reference to this merge request. Could you add some review notes so we know what to fix / look out for when testing?

          • Mark Harding
            Mark Harding @markeharding started a thread on an old version of the diff 2 days ago
            Last updated by Ben Hayward 19 hours ago
            Entities/Image.php
            295 299
            296 300 if ($field == 'access_id') {
            297 301 $data[$field] = (int) $data[$field];
            302 } elseif ($field == 'nsfw') {
            • Mark Harding
              Mark Harding @markeharding · 2 days ago
              Owner

              classes\ElggEntity:L1558 handles the NSFW validation checking. Why is a JSON object being provided? Currently any values could be set here.

            • Ben Hayward @benhayward.ben changed this line in version 12 of the diff 19 hours ago

              changed this line in version 12 of the diff

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on an old version of the diff 2 days ago
            Resolved by Ben Hayward 1 day ago
          • Mark Harding
            Mark Harding @markeharding started a thread on an old version of the diff 2 days ago
            Resolved by Ben Hayward 1 day ago
          • Mark Harding @markeharding added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label 2 days ago

            added scoped label and automatically removed label

          • Ben Hayward @benhayward.ben added 35 commits 20 hours ago

            added 35 commits

            • 4f78a38e...4fb65001 - 34 commits from branch master
            • ba297a25 - Merge branch 'master' of gitlab.com:minds/engine into fix/blog-media-nsfw-update-1936

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 19 hours ago

            added 1 commit

            • 256265c6 - Update for feedback

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 19 hours ago

            added 1 commit

            • 3a6eb800 - minor change

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 5 hours ago

            added 1 commit

            • 572a567e - Lint

            Compare with previous version

          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet started a thread on the diff 25 minutes ago
            Controllers/api/v1/blog.php
            220 220 $blog->setMature(!!$_POST['mature']);
            221 221 }
            222 222
            223 if (isset($_POST['nsfw'])) {
            • Brian Hatchet
              Brian Hatchet :speech_balloon: @brianhatchet · 25 minutes ago
              Developer

              https://fix-blog-media-nsfw-update-1936.minds.io/brianhatchet2/blog/brian-s-naughty-blog-1043584914609410049

              That blog is marked NSFW for every category.

              It is accessible publicly without being logged in. The image is not blurred out in the feeds and the image is not marked as NSFW on the image feeds

            • Please register or sign in to reply
          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet started a thread on an old version of the diff 25 minutes ago
            Last updated by Ben Hayward 20 minutes ago
            Entities/Image.php
            222 223 $export['thumbs:down:count'] = Helpers\Counters::get($this->guid, 'thumbs:down');
            223 224 $export['description'] = $this->description; //videos need to be able to export html.. sanitize soon!
            224 225 $export['mature'] = $this->mature ?: $this->getFlag('mature');
            226 $export['nsfw'] = $this->nsfw ?: [];
            • Brian Hatchet
              Brian Hatchet :speech_balloon: @brianhatchet · 25 minutes ago
              Developer

              This is already exported by ElggEntity. We don't need to export it again

            • Ben Hayward @benhayward.ben changed this line in version 15 of the diff 20 minutes ago

              changed this line in version 15 of the diff

            • Please register or sign in to reply
          • Ben Hayward @benhayward.ben added 1 commit 20 minutes ago

            added 1 commit

            • 5a510bff - Update for feedback

            Compare with previous version

          Please register or sign in to reply
          Assignee
          Xander Miller's avatar
          Xander Miller @xander-miller
          None
          Milestone
          None
          Time tracking
          No estimate or time spent
          2
          Labels
          MR::Requires Changes Squad::Yellow
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Guy Thouret
          user avatar
          Marcelo Rivera
          user avatar
          Emiliano Balbuena
          user avatar
          Mark Harding
          user avatar
          Martin Santangelo
          user avatar
          Rami Albatal
          user avatar
          Olivia Madrid
          Reference: minds/engine!384