Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

e5an's Achievements


Newbie (2/6)



  1. Or more generally, change the order of repeater items from the API? I'm doing something like this in response to a form submission: $thatPage->of( false ); $newItem = $thatPage->my_repeater->getNew(); $newItem->foo = 'bar'; $newItem->save(); $thatPage=>my_repeater->add( $newItem ); $thatPage->save(); This works; the newly created item is added to the end of the array. But what I really wanted was to add it to the start of the item array ( like 'unshift' rather than 'push' ). It seemed like I should be able to do that by just changing the line $thatPage=>my_repeater->add( $newItem ); to $thatPage=>my_repeater->prepend( $newItem ); Surprisingly, this behaves exactly the same. The newly created item is still the last one in the list. If I can't insert it at position 0, could I insert it at the end, then move it up to the start in the next line? (How?) I guess the obvious 'solution' is to drag-and-drop reverse the order of all the repeater items in the backend GUI, then change the php template of that page to display them in reverse order... Could have already done that and moved on but I'd rather understand whatever it is here I'm not getting.
  2. Thanks, the upload_max_filesize fixed it. Didn't know that was a separate thing.
  3. Trying to upload files on the backend: 'Field is too big - maximum allowed size is 2048 kb' I found that it's supposed to be using ini_get('post_max_size') to get this value. When I print the value of ini_get('post_max_size') , it says '8M' which I confirmed is the limit it is set to in the php.ini, which I confirmed is the correct php.ini with phpinfo(). I also tried putting the line 'php_value upload_max_filesize 10M' at the end of the .htaccess in the processwire folder. This did nothing. I really need to be able to upload larger files, so I really need to know where this 2MB limit is coming from and how to change it but I am out of ideas.
  • Create New...