winter icon indicating copy to clipboard operation
winter copied to clipboard

Calling partial() as a function to check for the existence of a partial fully executes the partial

Open LukeTowers opened this issue 2 years ago • 9 comments

Calling partial(path) as documented to determine if path exists and can be run as a partial fully executes the partial which includes any put statements (i.e. put scripts) which can lead to further issues like script resources added via put scripts being duplicated in the final output. See https://github.com/OFFLINE-GmbH/oc-microcart-plugin/blob/master/components/cart/payment_data.htm#L3 for an example of an affected plugin.

LukeTowers avatar Aug 02 '21 03:08 LukeTowers

@LukeTowers while we could certainly change the behaviour of the partial() method, it might be being used (somewhat incorrectly) to load partials and therefore could be a breaking change.

I think we might have to, in this instance, create a new method (perhaps exists()) that checks existence and update the docs to indicate the true behaviour of the partial method.

bennothommo avatar Aug 02 '21 04:08 bennothommo

@bennothommo yeah, that's what I was thinking, something like partialExists(), pageExists(), etc

LukeTowers avatar Aug 02 '21 05:08 LukeTowers

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] avatar Oct 02 '21 00:10 github-actions[bot]

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] avatar Dec 02 '21 00:12 github-actions[bot]

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] avatar Feb 01 '22 00:02 github-actions[bot]

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

github-actions[bot] avatar Apr 03 '22 00:04 github-actions[bot]

This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months. If this issue is still relevant or you would like to see it actioned, please respond within 3 days. If this issue is critical for your business, please reach out to us at [email protected].

github-actions[bot] avatar Oct 03 '22 00:10 github-actions[bot]

This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months. If this issue is still relevant or you would like to see it actioned, please respond within 3 days. If this issue is critical for your business, please reach out to us at [email protected].

github-actions[bot] avatar Apr 04 '23 00:04 github-actions[bot]

This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months. If this issue is still relevant or you would like to see it actioned, please respond within 3 days. If this issue is critical for your business, please reach out to us at [email protected].

github-actions[bot] avatar Oct 04 '23 00:10 github-actions[bot]