
pwFoo
Members-
Content Count
699 -
Joined
-
Last visited
-
pwFoo started following $pages->add() bug?, Better database abstraction, SQLite has FTT. Could it be a viable alternative database backend for PW? and and 6 others
-
Yes! 👍 I would love to see such a DB class standalone for small not PW projects! Best ever! In the last time I found some nice frameworks like Flight PHP micro-framework (router, hooks, extendable, views, ...) or db frameworks Medoo, Propel3 and lessql.
-
SQLite would be nice, but not really needed. If possible and changes to database abstraction is needed a move to PDO would make it possible. At the moment it would be interesting because of a small private php project which should run on cheap webhostings without extra features. So sqlite would reduce the requirements *g* With a small private projects I would try to keep hosting cost low... But web hostings with mysql isn't expensive today...
-
Hi, I would use Service worker for additional tasks like push notifications. Instead of build another service worker module it would be great to add (custom) code to the existing service worker?
-
Nice module, but I would prefer push notifications dependent on used browser only instead of an additional push provider. It works with that demo cross browser (with system-worker web push api support). https://webpushdemo.azurewebsites.net/
- 23 replies
-
- 1
-
-
- alerts
- notifications
-
(and 1 more)
Tagged with:
-
Hi @stikki, thanks for take a look into it. Additional / instead of GUI field selection I use a array to filter the fields to convert / output. At the moment I have some other topics and can't work & play with PW. My code seems to work for my needs and I like the multidimensional filter array to filter sub-pages and wirearray / pagearray / image fields too. So if you could implement it a nice and easy way it would be fine. I like to have one module for one job and not some similar modules 😉
-
WireHTTP use custom port and self signed certificate
pwFoo replied to pwFoo's topic in General Support
UPDATE I can't test self signed certificate to work because WireHttp don't respect given connection port? The following url: https://127.0.0.1:10000/api/... Will return that error message: 2: fsockopen(): unable to connect to ssl://127.0.0.1:443 (Operation timed out), 110: Operation timed out Looks like port 10000 is changed to default https port 443 by WireHttp? php curl is installed and also tried to force it with option 'use' (if it falls back to another method). Need it solved or drop WireHttp for that use ☹️ -
I won't enable UrlSegments for each template, but have a autoload module with should react based on path / urlSegments. Don't like the way to do it with query string. So allow one urlSegment by name (string) would be nice without the need to activate urlSegments at all.
-
How to enable urlSegments runtime instead of persistent in template settings? And where to be loaded before the current page returns a 404 error? https://processwire.com/docs/front-end/how-to-use-url-segments/#how-do-you-enable-url-segments
-
Hi, I try to convert a rest api client to WireHttp and seaching for the option? verify=false // curl --insecure, self signed certificates Haven't found such a option in api documentation or source code (quick search...). Are self signed certificates supported by WireHttp?
-
solved Custom permissions page-delete-own and page-edit-own
pwFoo replied to pwFoo's topic in General Support
Hi @gmclelland, strange... Image isn't broken here, but I changed the post a short time later because I fixed it... The changes are gone, just the "solved" tag is there. Problem was that the page was moved to trash and so parent wasn't home ("/") anymore. So different permissions and trashable == false was "fine". I moved the page back and all looks good. -
solved Custom permissions page-delete-own and page-edit-own
pwFoo replied to pwFoo's topic in General Support
Thanks! Tested the permissions, but have a problem with permissions or understanding how it works. "page-create" is activated for "basic-page". Don't know if needed... just activated to test... My role has the following permissions set. Tried to add a page to home ("/") with template ""basic-page". Do some permission check before... Page owner: test Current user: test Current user roles: guest, writer Current user permissions: page-view, page-edit // --> missing allowed permissions "page-edit-created, page-edit-trash-created" Addable (parent): 0 // --> 1 (allowed to add child to "/") Addable (child to page): 0 // --> OK, add to parent should work, not add children to that page Editable: 1 // --> OK, but by page-edit or as should page-edit-created??? Trashable: 0 // --> 1 (allowed by page-edit-trash-created) Deleteable: 0 // --> OK, just allowed to trash the page... User test has role "writer" (screenshot with permissions), is page owner(!). Added expected values to the permission check output above. Checked by addable(), editable(), trashable() and deleteable() methods. -
Hi, I try to add page-edit-own and page-delete-own permissions, but it's strange... If a add the custom permissions it looks like both are children of page-edit respectively page-delete. I played with added / revoked permissions, but I can't get it work, that a user of a role just can delete own content. First the user can't delete any content and now the user can delete own and foreign pages 🤪 Is there a tutorial to learn more about the PW permissions? Or do I have to rename the permissions to page-own-edit and page-own-delete to be independent from page-edit and page-delete?
-
Module method name create() was the problem... Changed to add() to have the same naming than permissions page-* and it works fine!
- 1 reply
-
- 2
-
-
I tried to add a new page with $pages->add() with a custom method inside of a module. It looks like the method is called each page load (as should) and also if the backend page tree is loaded / refreshed (bug??)? public function create($template, $parent, Array $data = array(), $name = false) { $name = wire('sanitizer')->pageName($name ? $name : $data['title']); $obj = wire('pages')->add($template, $parent, $name, $data); return $obj; } called inside of home page ("/"): $api->create('basic-page', '/', array('title' => 'ApiCreatedTest1')); Works fine. Load it twice (create duplicate page) results in an error. But without "/" requested the page gets created if I view the backend?! Checked it by delete the page, check the page tree again and it looks fine. But if I reload the backend page the page appears again. So backend page tree load executes the home page ("/") and create the page? Is it a bug or I'm missing anything...?