Jump to content

Juergen

Members
  • Posts

    1,306
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by Juergen

  1. Hello benbyf, I have tried the demo at http://bbstarter.nicegrp.com/ If you use the search it leads to an error. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Error has been logged. Best regards
  2. Independent if the backup is created manually or via cron job - same result. Best regards
  3. Hello @ all Strange behavior: Upgrading to dev version 21 (comments with star rating), doesnt grab configuration settings - star rating field and URL field will not be shown if set to yes. This ist the frontend with renderAll(): As you can see no star rating or URL field will be shown. Does anyone have the same problem?
  4. I have upgraded PW to the latest dev version (21) and now I get the following error if I want to open a backup: Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /home/.sites/24/site1275/web/wire/core/Selectors.php line 283) #0 /home/.sites/24/site1275/web/wire/core/Selectors.php(320): Selectors->create('0', '', ':7232549db11.sq...') #1 /home/.sites/24/site1275/web/wire/core/Selectors.php(115): Selectors->extractString('0:7232549db11.s...') #2 /home/.sites/24/site1275/web/wire/core/Selectors.php(104): Selectors->setSelectorString('0:7232549db11.s...') #3 /home/.sites/24/site1275/web/wire/core/Pages.php(213): Selectors->__construct('0:7232549db11.s...') #4 [internal function]: Pages->___find('0:7232549db11.s...', Array) #5 /home/.sites/24/site1275/web/wire/core/Wire.php(397): call_user_func_array(Array, Array) #6 /home/.sites/24/site1275/web/wire/core/Wire.php(332): Wire->runHooks('find', Array) #7 /home/.sites/24/site1275/web/wire/core/Pages.php(320): Wire->__call('find', Array) #8 /home/.sites/24/site1275/web/wire/core/Pages.php(320): Pages->find('0:7232549db11.s...', Array) I dont know if the error exist only after the last upgrade or if it occured earlier. What does this error message means? Does anyone have the same problem? Best regards
  5. Hello kixe, yes you are right, it is Ryans ProcessDatabaseBackups, which is responsible for the backups. So your module does the job quite well - the module creates a new backup after the time period I have choosen. It seems all ok unless I click on the backup to open it, then I get the error message (also at backups which were made with the latest dev version) - I will post this problem in the general section. Best regards
  6. I have upgraded PW to the latest dev version (21) and now I get the following error if I want to open a backup: Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /home/.sites/24/site1275/web/wire/core/Selectors.php line 283) #0 /home/.sites/24/site1275/web/wire/core/Selectors.php(320): Selectors->create('0', '', ':7232549db11.sq...') #1 /home/.sites/24/site1275/web/wire/core/Selectors.php(115): Selectors->extractString('0:7232549db11.s...') #2 /home/.sites/24/site1275/web/wire/core/Selectors.php(104): Selectors->setSelectorString('0:7232549db11.s...') #3 /home/.sites/24/site1275/web/wire/core/Pages.php(213): Selectors->__construct('0:7232549db11.s...') #4 [internal function]: Pages->___find('0:7232549db11.s...', Array) #5 /home/.sites/24/site1275/web/wire/core/Wire.php(397): call_user_func_array(Array, Array) #6 /home/.sites/24/site1275/web/wire/core/Wire.php(332): Wire->runHooks('find', Array) #7 /home/.sites/24/site1275/web/wire/core/Pages.php(320): Wire->__call('find', Array) #8 /home/.sites/24/site1275/web/wire/core/Pages.php(320): Pages->find('0:7232549db11.s...', Array) # I dont know if the error exist only after the last upgrade or if it occured earlier. What does this error message means?
  7. Strange behavior. I have the following settings in my Details Tab: German: %e. %B %G English: %e %B %G A slightly difference - German has a dot(.) after %e - it outputs all in correct language: German: 22. Oktober 2015 English: 22 October 2015 Try it with this date formats and see if the result are the same as in this example. Best regards Jürgen
  8. Hello @ all, today I am struggeling with the deletion of empty repeater items after saving in the backend. Explaination: Imagine you are adding an additional repeater item in your form in a page via the "Add button". Then you forget to fill out this item so it is empty. After submitting the form the empty repeater item is still there because you did not deleted it with the basket symbol (deletion) Goal: In theory it must be possible to create a hook that checks the repeater items for content and delete the empty items after saving. At the moment I dont know how to check if an item is empty or not. I know how to delete fields in the repeater item but not the complete item itself. Can anyone point me into the right direction? Best regards
  9. At the moment I dont use functions to create a menu out of the page tree, because you are more flexable. In most cases the menus consist of not so much items. If you use the pagetree to create the menu you are in a fixed structure. With manual writing of the menu you could change the markup, you can show only the items you want, you can easly integrate icons to each menu point,.....all without problems. So its quite worth to think over if you really need a function for your menu. Best regards
  10. Same problem here, but with image focus area fieldtype. https://processwire.com/talk/topic/8079-imagefocusarea/?p=103424 I use the latest php version. Best regards
  11. Hello, I always get the following message: Warning: strpos() expects parameter 1 to be string, array given in /home/.sites/.......web/wire/core/Pageimage.php on line 312 Just to clearify: It works as expected and I have turned on the debug mode - so I can see the message, but I dont understand what exactly could be the problem. This is the code in Pageimage.php starting with line 312 if(strpos($options['cropping'], 'x') === 0 && preg_match('/^x(\d+)[yx](\d+)/', $options['cropping'], $matches)) { $options['cropping'] = true; $options['cropExtra'] = array((int) $matches[1], (int) $matches[2], $width, $height); $crop = ''; } else { $crop = ImageSizer::croppingValueStr($options['cropping']); } Best regards
  12. Thanks LostKobrakai, now I solved it with a session id in an hidden input field that will be compared with the post value of the hidden field after submission. If session value and post value are same then send the form data and remove the session id. If someone hits the F5 button after submission, the valid session id is no more longer available (because it was removed after submission) and so the values dont match any longer. As a result a hint for "double submission" appear on the screen instead of submitting the form. The reason why I missunderstood the CSRF was a post by Soma in another topic where he uses CSRF to prevent double submissions. https://processwire.com/talk/topic/3633-prevent-form-resubmission/?p=35567 Best regards
  13. Thanks, I have misunterstood something completely, so I will redirect after $mail->send(); Best regards
  14. Hello @ all, today I have tried to implement the CSRF validation for the first time on a contact form. I have implemented the tokens to the form in a hidden field. So far so good, but the validation shows always "1" after sucessfull or failed submission. I have a custom form with Bootstrap 3 Markup and this is the code that runs after there are no errors in the form: if($session->CSRF->validate() == "1"){ //send the data and create the success message $thankyou = __("danke nachricht"); $mailsenttext = __("Nachricht erhalten"); $out = "<div class='alert alert-success' role='alert'><span class='fa fa-check fa-3x pull-left fa-border'></span><h4>$thankyou</h4><p>$mailsenttext</p><div class='clearfix'></div></div>"; //create the email $fullname = $firstname . ' ' . $lastname; $userip = $_SERVER['REMOTE_ADDR']; $mail = new PHPMailer(); $mail->IsHTML(true); $registertext = __("Mailheader Contactform"); $senderinfo = __("Absender Label"); $mail->From = $email; $mail->FromName = $fullname; $mail->AddAddress($emailTo); $mail->AddReplyTo($email, $fullname); $mail->Subject = $subject; $mail->Body .= "<p><b>$subjectlabel:</b> $subject</p><p><b>$messagelabel</b><br />$comments</p><p><b>$senderinfo</b><br />$gendername $firstname $lastname<br />$email<br />IP: $userip</p>"; $mail->send(); $form = ""; } else { //dont send data and create an error message $out = "<div class='alert alert-danger' role='alert'><span class='fa fa-warning fa-3x pull-left fa-border'></span><h4>$warning</h4><p>$doublesubmissiontext</p><div class='clearfix'></div></div>"; } Unfortunately the value of the $session->CSRF->validate() is always "1", even after successfull submission, so the form could be sent multiple times. What I am doing wrong? Best regards Jürgen
  15. Maybe this article could help you: https://processwire.com/talk/topic/3325-filter-results-via-multiple-dropdowns/?p=32779 Best regards
  16. Hello @ all As I wrote in an earlier post (https://processwire.com/talk/topic/3265-fredi-friendly-frontend-editing/?p=100192): Fredi doesnt grab or save files or images if they are inside a repeater field - can anyone confirm this behavior or ist this only in my case? If the file type field or image type field is outside the repeater field and the settings are on multiple files it is not a problem. Strange behaviour: If I call a page via a pagetable field it always grabs and saves the file/image in a repeater field Best regards.
  17. Thanks tpr! A workaround is to add a pagetable field to the template. There you can add/edit/remove children if you want and its not necessary to let the children tab be visible. Disadvantage: it opens the child in another modal (modal in modal) - but it works. Best regards
  18. @tpr Have you ever tried to edit pages in the children tab? I have tried it, but the modal window will be closed after clicking the edit link of a child page in the children tab.
  19. You are right. I have tried it with "ProcessPageEditChildren" first and it didnt work. Then I have tried "Inputfield_ProcessPageEditChildren" and were also not successfull. Now it works - why it didnt work before - I dont know. Best regards
  20. I have a problem targeting the children tab. Here is my code of the edit link: if($page->children) { if (function_exists("feel")) { echo feel($page, $editpage, "relative button invert", 0, "Inputfield_ProcessPageEditChildren", array( "enableTemplateEdit" => false, "selectorsToHide" => "", "fieldHighlightStyle" => "outline: 4px double #ddd;", "popupSettings" => array( "closeOnBgClick" => true ) ) ); } } Inputfield_ProcessPageEditChildren is the id of the children tab, but it always opens the first tab.
  21. Setting and delete tab is hidden. Is there a way to activate these tabs in the modal if necessary? Best regards SOLVED: Use the options to declare the tabs which should be hidden selectorsToHide: list of selectors to hide elements from admin (for example some tabs)
  22. SOLVED: changed the module name from MarkupSVGIcons.module to MarkupSvgIcons.module - error is gone away.
  23. I wanted to try this awesome module, but unfortunately I got this error after installation: Notice: Undefined index: MarkupSvgIcons in ..../web/wire/core/Modules.php on line 569 Notice: Undefined index: in ..../wire/core/Modules.php on line 570
  24. Thanks for your help LostKobraKai and Martijn, now the value will be added to the parent page. For all others who are interested in this, here is the complete code snippet: public function init() { $this->addHookAfter('Pages::saved', $this, 'saved'); } public function saved($event) { $page = $event->arguments[0]; if($page->template == "productpricelistitem"){ //run the hook under this condition - page which will be edited $parent = $page->parent;//get the parent page $parent->offercheck = "5"; //example value to store in the parent page in the field with the name offercheck $parent->save("offercheck"); //save the parent page } } If you use a pagetable field as in my case, dont forget to reload the parent page if you want to see the value in the field. Best regards
  25. @ LostKobraKai: you are right - the error message is gone, but it will not store any value in the field of the parent page. @ Martijn: I dont know exactly what you mean, but my goal is to add a value to a field of a parent page if the child page has a specific value in a field. I can use a hook to populate the value of a field in the page, but I am not able to do the same in the parent page.
×
×
  • Create New...