Comments (10)
remove the ;
and it should work
from processwire.
The error is in the issue, not in the original code. Sorry about that. The issue is still open.
I edited that typo out.
from processwire.
I'm still not sure about the issue, as the function's implementation (according to git) didn't change for over a year and I've used this many times.
from processwire.
Have you tried it with setting the value into a temp variable first?
$temp = time() + 12 * 3600;
$page->setAndSave(array(
'next_action' => 'JustTest',
'next_action_time' => $temp
));
from processwire.
I did with no luck. Actually I do not get an error but "Connection was reset" (if I translate it correctly) from a browser.
from processwire.
@ivangretsky I can't seem to duplicate this one. Here's the code I used to test:
$p = $pages->get(1);
$p->setAndSave(array(
'headline' => 'Test Headline',
'test_integer' => 3,
));
After executing that code, headline and test_integer were updated to the new values.
When you say that it's not working, can you expand on that–does one value update and not the other, or neither, or you see an error message? Your original code looks good to me, it certainly should work. Probably what needs to be looked at next are the next_action and next_action_time fields. I tried to duplicate your test by using FieldtypeText and FieldtypeInteger fields, is that what you are using as well? What other 3rd party modules are installed?
from processwire.
next_action_time is datetime
from processwire.
I tested again with a datetime field added to the mix, but still working correctly here.
When you say that it's not working, can you expand on that–does one value update and not the other, or neither, or you see an error message?
What other 3rd party modules are installed?
from processwire.
Thank you for your help. I'll test it again and report here. Seems like I messed up somewhere as the issue is not reproduced by all you kind people.
from processwire.
@ivangretsky I'm going to close this out since I'm moving to the issues repo, but if you find the issue persists please open it at: https://github.com/processwire/processwire-issues/issues
Thanks,
Ryan
from processwire.
Related Issues (14)
- Different url-segment handling depending on the setting of $config->pageNameCharset HOT 2
- Using Custom Editor JS Styles Set causes js console error HOT 1
- Datepicker language changed and json not saved in database HOT 2
- Impossible to suppress language in editUrl for language-enabled sites?
- Cross-Site Scripting v1.3.6 HOT 11
- XXE Vulnerability HOT 18
- $session->forceLogin does not update $user variable HOT 3
- Error: Allowed memory size HOT 2
- Changing field type from TextareaLanguage to Textarea throw Notice. HOT 1
- Update Link To Reference The New Repository HOT 4
- Allow more options to override for Image field in contexts HOT 1
- READ THIS BEFORE SUBMITTING ISSUE REPORTS
- page-publish button does not disappear fully disappear. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from processwire.