Skip to content

Resolved an issue affecting withRelationships with two or more steps - #5015

Merged
boutell merged 1 commit into
mainfrom
pro-8108
Jul 29, 2025
Merged

Resolved an issue affecting withRelationships with two or more steps#5015
boutell merged 1 commit into
mainfrom
pro-8108

Conversation

@boutell

@boutell boutell commented Jul 29, 2025

Copy link
Copy Markdown
Member

This issue could cause a document to appear to be related to the same document more than once. If several documents in the first step of the withRelationships path are related to the same document in the second step, then widgets containing relationships in the second step might populate with multiple copies of the same image.

In particular: [ 'articles', 'authors' ] in apollo, where 'authors' have an area containing an image widget, and the same author was attached to several articles.

…s. This issue could cause a document to appear to be related to the same document more than on

ce
@boutell
boutell requested a review from myovchev July 29, 2025 20:11
@linear

linear Bot commented Jul 29, 2025

Copy link
Copy Markdown

<ol
@click="isSuppressingWidgetControls = false"
class="apos-area-widget__breadcrumbs"
@click="isSuppressingWidgetControls = false"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated, satisfies eslint

post: {
upload: [
self.canUpload,
//In the existing code, we are reading the zeroth element from the files array object, which results in processing only a single file. Therefore, I am currently reading just one file from the Multer package.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated, satisfies eslint, comment is not necessary anymore

return attachment;
} finally {
//Hence I am reading the single file from the upload and I am checking the condtion for the same
if (req.file) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated, satisfies eslint, comment is not necessary anymore

getter,
idMapper
) {
// This method never alters the items array itself, it alters

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that reducing to unique elements in this way does not make new objects nor does it test actual object contents. This is intentional. We just want to eliminate duplicates by reference.

@boutell
boutell merged commit 681bac3 into main Jul 29, 2025
9 checks passed
@boutell
boutell deleted the pro-8108 branch July 29, 2025 20:37
haroun added a commit that referenced this pull request Jul 30, 2025
* main:
  Resolved an issue affecting `withRelationships` with two or more steps. This issue could cause a document to appear to be related to the same document more than on (#5015)
  thanks! (#5014)
  Fix #4979: Replace connect-multiparty with multer to resolve security vulnerability (#5013)
  Hide rich text controls on interaction (#5008)
haroun added a commit that referenced this pull request Jul 31, 2025
* main:
  PRO-8130: default node parseHTML now detects whether an element has the relevant class, or lack of one, before classifying it as a default node (#5017)
  Add regression tests for duplicate relationships resolution in some edge cases (#5016)
  Resolved an issue affecting `withRelationships` with two or more steps. This issue could cause a document to appear to be related to the same document more than on (#5015)
  thanks! (#5014)
  Fix #4979: Replace connect-multiparty with multer to resolve security vulnerability (#5013)
  Hide rich text controls on interaction (#5008)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants