We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using preload(['foo')] will set foo as changed.
preload(['foo')]
foo
preload should not affect getChanges().
preload
getChanges()
Add a template with a non-autojoined field firstname. Create a page with a firstname field. Run this:
firstname
$p = $pages->get(1234); echo("Changes before preload: " . json_encode($p->getChanges()) . "\n"); $p->preload(['firstname']); // fetches firstname echo("Changes after preload: " . json_encode($p->getChanges()) . "\n");
This incorrectly results in:
Changes before preload: [] Changes after preload: ["firstname"]
I would expect $p->preload(['firstname']) to and $p->get('firstname') do the same thing: fetch the value from DB but not set the field as changed.
$p->preload(['firstname'])
$p->get('firstname')
The text was updated successfully, but these errors were encountered:
Fix issue processwire/processwire-issues#2004
405da18
Thanks @tuomassalo I've pushed a fix for this
Sorry, something went wrong.
No branches or pull requests
Short description of the issue
Using
preload(['foo')]
will setfoo
as changed.Expected behavior
preload
should not affectgetChanges()
.Steps to reproduce the issue
Add a template with a non-autojoined field
firstname
. Create a page with a firstname field. Run this:This incorrectly results in:
I would expect
$p->preload(['firstname'])
to and$p->get('firstname')
do the same thing: fetch the value from DB but not set the field as changed.Setup/Environment
The text was updated successfully, but these errors were encountered: