Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update finished function, issue-27 #78

Merged
merged 6 commits into from
Oct 13, 2023

Conversation

sukhwinder-somar
Copy link
Contributor

@sukhwinder-somar sukhwinder-somar commented Aug 15, 2023

Issue #27

src/Control/ElementFormController.php Outdated Show resolved Hide resolved
src/Control/ElementFormController.php Outdated Show resolved Hide resolved
src/Control/ElementFormController.php Outdated Show resolved Hide resolved
src/Control/ElementFormController.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

From your response in #78 (comment) it sounds like when $page is null, that's actually an error state which is unrelated to the issue this PR is trying to resolve.

Nothing about this PR introduces a new scenario where $page is null, so there's no need to add handling for that scenario in this PR. Returning null here is unexpected, and the behaviour of anything calling this method and getting a null result is undefined. So as per below, please remove that.

src/Control/ElementFormController.php Outdated Show resolved Hide resolved
src/Control/ElementFormController.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

Did you test this PR before submitting it?
It doesn't resolve #27 for me. When I test it with a debugger, the finished() method doesn't even get hit before the error occurs.

I'll add a stack trace in a comment to #27 which will show where the exception is actually being thrown from. It seems to stem from ElementalContentControlExtension in dnadesign/silverstripe-elemental, which I note you mentioned you had changed in #27 (comment)

@sukhwinder-somar
Copy link
Contributor Author

sukhwinder-somar commented Oct 10, 2023

I was getting same error which has been mentioned in Issue 27 i.e. I added that and I do have deployed my changes to the prod on our project and I think it's been 3 months now since I have deployed the changes to prod and doesn't seems to cause any issue so far, Also this is only half part of fix, I also had to make changes in silverstripe-elemental in ElementalContentControllerExtension.php - #27 (comment)

@GuySartorelli
Copy link
Collaborator

Also this is only half part of fix, We also had to made changes in silverstripe-elemental in ElementalContentControllerExtension.php

Can you please create a pull request which introduces those changes? This PR is not useful without the full fix.

@sukhwinder-somar
Copy link
Contributor Author

Hi,

Sure, just created a new PR for other changes, please let me know if something needs to be changed thanks

Copy link
Collaborator

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

This is the second half of the fix - silverstripe/silverstripe-elemental#1107 solves the other half.

Looks good to me, thanks for fixing this.

@GuySartorelli GuySartorelli merged commit 9fbe7be into dnadesign:3.3 Oct 13, 2023
11 checks passed
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.

3 participants