Jump to content

FlorianA

Members
  • Posts

    53
  • Joined

  • Last visited

About FlorianA

  • Birthday November 8

Profile Information

  • Gender
    Male
  • Location
    Northern Germany

Recent Profile Visitors

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

FlorianA's Achievements

Full Member

Full Member (4/6)

21

Reputation

  1. OK, it proceeds, there were still some filesystem and database permission issues, that's why I couldn't see log messages. I still can't see my pages, but I think it's because something went wrong at DB import - e. g. the "pages" and the "templates" table are missing. Hope I can resolve this myself, thank you so far.
  2. Hi @Gideon So, thanks for your reply. $config->debug is already set. Where can I get the additional information? Is there a log file?
  3. After moving my Web IDE from Windows to MacOS, both with XAMPP, I can't open my PW-based site any more. The browser shows this message: Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 262144 bytes) in /Applications/XAMPP/xamppfiles/htdocs/jvh/wire/core/WireHooks.php on line 205 On my previous Windows installation, the same site loads without problems. Even increasing the PHP memory_limit of 512MB by a factor 10 doesn't change anything (except the location of the error), so I think, a low memory_limit value shouldn't actually be the problem. But what else? Any help is appreciated. Using XAMPP 8.2.4 for MacOS, ProcessWire 3.0.200.
  4. Hi, I'd like to add a checkbox ("Notify users about changes") to the user profile editor and, after user has saved his profile and checked this box, send some e-mail notifications about his changes. I'm using a mechanism like that successfully for other pages by using hooks on ProcessPageEdit::buildFormContent and Pages::saved, this also works when editing any "user" page as admin, but it doesn't work when editing the user page via the "Profile" menu item. Is there any hook that can achieve that for profile editing? I've tried ProcessProfile::execute, but I couldn't find a way to get the form's raw data from there.
  5. Sounds logical. And it works with Page Auto Complete. Thank you, @taotoo ?
  6. Hi all, on my site, I use one template with a field of type Page/AsmSelect (a single-page template used for site settings). When I try to edit the page of this template, loading of the page editor is extremely slow - I can't do it on the productive server, since the 30-second execution time limit of my provider exceeds. After removing the Page/AsmSelect field from the template, it works without problems, but as soon as I add it again, the editor becomes slow again - even if the field's value doesn't contain any page references. Is this a known issue? Should I do anything different? Any help will be appreciated! Florian
  7. Thanks for your replies. I've already tried to create the page in advance and redirect the user to the edit URL. The drawback is that the page needs to get a dummy title that has to be overwritten by the user. @Studio Lambelet, your hook does work, but is it also possible to retrieve the template of the parent page? This would be important for me in order to get a context sensitive message. Maybe I'll try a third solution with two links in the frontend: "Quick upload": User can specify a page title and file to be uploaded in a small form. Page will created without showing backend. "Advanced upload": Regular call of the "new page" workflow which allows to specify more than one file and some more fields.
  8. Hi all, I'd like to have a link in my front-end to add a new page (urls('admin')."page/add/?parent_id=$parentId"). I can't use front-end editing since I'd like to use the drag-and-drop area for uploading files. On the other hand, the back-end workflow with its two steps, defining title and url, then entering the rest, might be a bit confusing for end users. Therefore I'd like to display a kind of help message on the "New Page" page. What is the easiest way to do this? Is there a corresponding hook (couldn't find one)?
  9. The field is called "user_visible_by" and says that only users with one of the referenced roles are allowed to see users with the current role. In most cases, users should be allowed to see users with their own roles, but not always, so it is necessary to define if users with a certain role are visible by users with the same role. As a stopgap, I could add a separate checkbox for this, but this won't be so elegant ...
  10. Hi all, I have defined a Page Reference field for the "role" template with the referenced template being "role", too. Now, when I try to select such a role reference for a certain role page, the currently edited role won't be shown in the selection list. Isn't it possible to define a page reference which refers to the current page itself? Florian
  11. Yes, it works with "roles", thanks. I must have done something wrong with my previous test ...
  12. It seems that the "allowed_roles" option does not work for the $page->protect() method. Neither does it show any effect when I try it, nor I could find the string "allowed_roles" in the module's source code. What I've found in source code was an option called "roles", but that doesn't work either ...
  13. OK, thanks for the link. So I'll use the $_POST variable.
  14. Hi all, could it be that input()->post does not cope with multi-dimensional arrays from POST data? Example data (pasted from Firefox network analysis): { "add[91896][]": [ "30227", "30312" ], "add[89364][]": "30430", "nr[91896][30227]": "a", "nr[91896][30312]": "b", "nr[89364][30430]": "c", "nr[91896][30332]": "", ... } My code: print "===add=== "; print_r($_POST['add']); print "===nr=== "; print_r($_POST['nr']); print "===add=== "; print_r(input()->post('add')); print "===nr=== "; print_r(input()->post('nr')); Result: ===add=== Array ( [91896] => Array ( [0] => 30227 [1] => 30312 ) [89364] => Array ( [0] => 30430 ) ) ===nr=== Array ( [91896] => Array ( [30227] => a [30312] => b [30332] => [30389] => [30364] => [30432] => [30208] => [30403] => ) [89364] => Array ( [30430] => c [30332] => [30350] => [30389] => [30384] => [30432] => [30403] => ) ) ===add=== Array ( ) ===nr=== Array ( ) Any ideas what could be wrong?
  15. Am I right to say that your example $start = date('z'); $end = $start + 7; $sevendays = $pages->find("mydatefield.day_of_year>=$start, mydatefield.day_of_year<$end"); doesn't work, if $start is within the last week of December? It won't find pages for January, since day_of_year starts with 1 again. My SQL solution for this would be something like select * from my_table where (DAYOFYEAR(my_date)+366 - DAYOFYEAR(CURDATE())) % 366 < 7 Is there an equivalent PW query solution for this? Thanks, Florian
×
×
  • Create New...