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 #100731088 passed for 587ee91b on fix/blog-media-nsfw-update-1936
          Requires 3 more approvals from Devs, Deployers, and QA.
          Marcelo Rivera
          Marcelo Rivera
          Guy Thouret
          Guy Thouret
          Emiliano Balbuena
          Emiliano Balbuena
          Mark Harding
          Mark Harding
          Rami Albatal
          Rami Albatal
          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 22
          • Commits 18
          • Pipelines 16
          • Changes 10
          7/11 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 3 weeks ago

            approved this merge request

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

            unapproved this merge request

          • Xander Miller @xander-miller approved this merge request 3 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
              
            • Collapse replies
            • Brian Hatchet
              Brian Hatchet :speech_balloon: @brianhatchet · 2 hours ago
              Developer

              This was a sandbox issue that got sorted out.

            • Please register or sign in to reply
          • 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 21 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 21 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 22 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 21 hours ago

            added 1 commit

            • 256265c6 - Update for feedback

            Compare with previous version

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

            added 1 commit

            • 3a6eb800 - minor change

            Compare with previous version

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

            added 1 commit

            • 572a567e - Lint

            Compare with previous version

          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet started a thread on the diff 2 hours ago
            Resolved by Brian Hatchet 2 hours ago
          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet started a thread on an old version of the diff 2 hours ago
            Resolved by Ben Hayward 6 minutes ago
          • Ben Hayward @benhayward.ben added 1 commit 2 hours ago

            added 1 commit

            • 5a510bff - Update for feedback

            Compare with previous version

          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet started a thread on the diff 2 hours ago
            Resolved by Ben Hayward 28 minutes ago
          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet started a thread on an old version of the diff 1 hour ago
            Resolved by Ben Hayward 7 minutes ago
          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet started a thread on the diff 1 hour ago
            Last updated by Ben Hayward 12 minutes ago
            Core/Blogs/Blog.php
            502 502 }
            503 503 }
            504 504 $this->nsfw = $array;
            505 $this->markAsDirty('nsfw');
            • Brian Hatchet
              Brian Hatchet :speech_balloon: @brianhatchet · 1 hour ago
              Developer

              I am pretty sure this gets set automatically when you call an attribute on a blog, but double check

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

              If you check in the legacy blog repository you can log the fields that are about to get written. Those should be set already

              Blogs/Legacy/Repository.php ~L216

            • Ben Hayward
              Ben Hayward @benhayward.ben · 12 minutes ago
              Developer

              On initial save it does, but on blog edit, the attribute needs to be marked as dirty or it does not show

              image

            • Please register or sign in to reply
          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet started a thread on the diff 1 hour ago
            Last updated by Ben Hayward 23 minutes ago
            Core/Blogs/Delegates/CreateActivity.php
            60 60 ->setThumbnail($blog->getIconUrl())
            61 61 ->setFromEntity($blog)
            62 62 ->setMature($blog->isMature())
            63 ->setNsfw($blog->getNsfw())
            • Brian Hatchet
              Brian Hatchet :speech_balloon: @brianhatchet · 1 hour ago
              Developer

              Double check to make sure that we are not handling this in propegate

            • Ben Hayward
              Ben Hayward @benhayward.ben · 23 minutes ago
              Developer

              Have double checked, not handled by propegateProperties though a fair thing to check.

            • Please register or sign in to reply
          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet started a thread on an old version of the diff 1 hour ago
            Resolved by Ben Hayward 6 minutes ago
          • Ben Hayward @benhayward.ben added 1 commit 9 minutes ago

            added 1 commit

            • 587ee91b - Refactored

            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
          Marcelo Rivera
          user avatar
          Guy Thouret
          user avatar
          Emiliano Balbuena
          user avatar
          Mark Harding
          user avatar
          Rami Albatal
          user avatar
          Olivia Madrid
          user avatar
          Brian Hatchet
          Reference: minds/engine!384