wintercms / wintercms/winter

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

Open
#263 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
PHP
Stars
1.5k
Forks
246
Avg merge
19h 2m
Merged PRs (30d)
7

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the documented partial() behavior and inspect the affected payment_data.htm example linked in the issue, especially its put scripts usage. Trace how partial(path) checks existence and determine what completion means: checking for a partial must not fully execute it or duplicate resources in the final output. No test or repository file is named, so a suitable regression test will need to be located or added.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.