Jump to content


  • Posts

  • Joined

  • Last visited

Community Answers

  1. joe_g's post in Integrity constraint violation ...sometimes was marked as the answer   
    ooh, I found the error – it's really embarrassing. But I wouldn't have found it without your help.
    Because the error appeared after my code, I was convinced it had to with the cms rather my stuff.
    Anyway, what I did was the rookie mistake:
    if($page->template->name='basicpage') {   instead of    if($page->template->name=='basicpage') {   many many thanks J  
  2. joe_g's post in preview (=publish, but only for logged in users) was marked as the answer   
    this is how "view" work. Didn't know

  3. joe_g's post in new page via API name error was marked as the answer   
    I could do this I guess, and then the name will be calculated?
    $default = wire("languages")->get("default");
    $p->title->setLanguageValue($default, 'blablabla');
  4. joe_g's post in Cannot redeclare class FieldtypeTextLanguage after copying site was marked as the answer   
    I solved it like this: https://processwire.com/talk/topic/2598-fatal-error-cannot-redeclare-class-sessionloginthrottle-on-update/
    I deleted the /wire folder, then pasted in the /wire folder from a different (totally unrelated) project
    the difference in my case was that it was happening locally
  5. joe_g's post in parentmost was marked as the answer   
    I was trying to get the top-event (Event3) from Sub-sub-event2 (or sub-event3, or sub-sub-sub-sub-sub-eventx).
    I guess the solution is simply ->parents('template=event')->first();
  • Create New...