Roberts R

  • Content count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About Roberts R

  • Rank
    Jr. Member
  1. Im not sure what I did wrong, but when i do changes on website (template/fields/links) as Im logged as admin I do see changes. But when I log out I don't. Even when I open website in PC that I have never opened website on I don't see updates. Its been like this for 2 days now. Cleared browsers cache and all. Any ideas? [ EDIT ] Solution : Since I put SSL for my website I had to add following in .htaccess SetEnvIf SSL on HTTPS=on
  2. I don't own the system. And server admins most likely will not setup things for me. So will have to run a script to do : $pages->emptyTrash(); Thanks for your support.
  3. Last night I run into issue. I was trying to empty my trash that have 140 000+ pages init. All pages have repeater fields. When I pressed "Empty" on trash menu I wasn't able to use back-end for 2h+ (I kept refreshing page when It time-outed). After PW process was done 30k pages were deleted. I'm still left with 110k pages to remove. Is there a way to safely remove all pages but with increased speed? Thanks
  4. I did run deletePages and AddPages on same run. It was reason for my reapeater not saving for some reason. deletePageChildren($pages->get('/parts/')); addAPEPArts(); I can't figure why pages didn't get deleted from datebase. But I guess that is story for another day.
  5. After working with PW for quite so time i came to my first issue: After testing around I added pages "part" with few fields and repeater. $p = new Page(); $p->template = 'part'; $p->parent = '/parts/'; $p->name = $pageName; $p->save(); $p->of(false); .... // adding repeater $store = $p->pStores->getNew(); $store->sCount = $sCount; $store->sPartNr = $sName; $store->sPrice = $sPrice; $store->sStore = $pages->get(24464)->id; $store->save(); $p->pStores->add($store); $p->save(); added about 1600 items. Later on I deleted them Using foreach ($pages->get('/parts/')->children as $p){ wire('pages')->delete($p); } Now i can't add any repeater items to new pages I create using code above. It gives me error Can't save page 0: /1473421482-73-1/: It has no parent assigned Now I try to delete repeater field and recreate it. But it says that Can't delete template 'repeater_pStores' because it is used by 1685 pages. But there are no pages. I looked in DB. and found that repeater fields still hold values for pages that does not exists. [EDIT]: found that pages still exist in db. So i deleted them manually. Recreated field but same problem stands. Im not sure in witch step I fcked up, but can someone point fingers at me and tell what i did wrong or why its not working?
  6. @BitPoet Thanks for solution. It fits my needs quite well
  7. I keep falling for same thing from time to time. ->of(false); ->save() Is something to remember when we talk about changing values in code.
  8. I understand theoretical part of how to do but fail to make it work. page field that have parent set as "Users" already contain all users under it and how do check if it have (I assume $field->get($user)). Or I miss something. EDIT: Ok it seems you can select for all users. With $item->viewed->add($user) you actually add them. As long as I don't touch viewed in backend - added ones are only ones who you get from $item->viewed->get($user) call
  9. would you use page field as check box? So in a backend admin can see who has viewed page.
  10. I can't figure this out if it is possible to make in PW natively :^) . How do you make unread posts/message/page for each user and make them marked as read for specific user when they view the page? I guess idea would be to create db where you save user ids and page ids and do the checks that way. Maybe someone has done other approaches. Ideas or advises are welcome.
  11. This seems to fit my project well. Thanks
  12. I can't figure this out. Problem: Have user role "Client" (several users with that role) and client can one or more children pages in children group. Lets say ("/products/"). They should not be able view other pages in that group and should not be able to EDIT pages that only they can view. All they should be able to do is to create children to pages they can view. Tried : "Page edit Per User" module, but if i give access to ("/products/test") they can edit. And I can't give access to children since I want User to able to create them and not me creating them and then giving access.