GithubHelp home page GithubHelp logo

Comments (10)

LostKobrakai avatar LostKobrakai commented on May 18, 2024

remove the ; and it should work

from processwire.

ivangretsky avatar ivangretsky commented on May 18, 2024

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.

LostKobrakai avatar LostKobrakai commented on May 18, 2024

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.

jdiderik avatar jdiderik commented on May 18, 2024

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.

ivangretsky avatar ivangretsky commented on May 18, 2024

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.

ryancramerdesign avatar ryancramerdesign commented on May 18, 2024

@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.

ivangretsky avatar ivangretsky commented on May 18, 2024

next_action_time is datetime

from processwire.

ryancramerdesign avatar ryancramerdesign commented on May 18, 2024

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.

ivangretsky avatar ivangretsky commented on May 18, 2024

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.

ryancramerdesign avatar ryancramerdesign commented on May 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.