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

fixedTopPageID Public API has gaps #1257

Open
2 tasks done
mfendeksilverstripe opened this issue Sep 26, 2024 · 0 comments
Open
2 tasks done

fixedTopPageID Public API has gaps #1257

mfendeksilverstripe opened this issue Sep 26, 2024 · 0 comments

Comments

@mfendeksilverstripe
Copy link
Contributor

mfendeksilverstripe commented Sep 26, 2024

Module version(s) affected

5.2.4

Description

Found some public API gaps in DNADesign\Elemental\TopPage\DataExtension related to the fixedTopPageID feature.

The only public API that is available related to this is withFixedTopPage() which is fine as this covers the majority case but we should also have public API for the following methods:

  • getFixedTopPageID() - currently exists, but is protected
  • setFixedTopPageID() - method is missing

These two methods are needed to properly integrate this feature with other features that use the onBeforeAction and onAfterAction pattern such as copyToLocale.

How to reproduce

Search for the following methods in DNADesign\Elemental\TopPage\DataExtension:

Expected

  • getFixedTopPageID() - method is public
  • setFixedTopPageID() - method is public

Actual

  • getFixedTopPageID() - currently exists, but is protected
  • setFixedTopPageID() - method is missing

Possible Solution

Ideally:

  • getFixedTopPageID() - change method to public
  • setFixedTopPageID() - add this method as public

less ideally but also workable:

  • change fixedTopPageID to protected

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants