Jump to content

helmut2509

Members
  • Posts

    110
  • Joined

  • Last visited

Everything posted by helmut2509

  1. Hi Abdus, I found out the cause of the error. In order to check if there has been a submit, I used "if ($input->post->submit).." and "if($input->post)..". The first one didn't work because I used a "button type=submit" instead of "input type=submit". I cannot guess the failure of "$input->post" because with a foreach loop, I get names and values. Another strange thing : when you check for " $input->post->anyfield" and this field is empty then you get a "false" returncode.... So you can only use a field of which you are sure that it is not empty... thanx for your help, though!
  2. Hi, I just noticed that the $input->post variable is empty when there are dynamically added input fields (by javascript) in the form. However when I make a print_r($_POST), all form fields and values do appear, inluding those which have been added dynamically. Is this a pw bug or am I making a mistake?
  3. thanks, that was it! I couldn't imagine that this is related to _one_ particlular page....
  4. thanks, but I just want to change the url segment '/en-home/' to '/en/'. I think this should not be so difficult, that a video is needed.... However, I have no solution so far....
  5. Where exactly can I find this "language label"? In which tab (Content, Children, Settings)?
  6. Hello, I am just working on a multi-language pw app. Default language is german, then comes english. the language segment for english in the url is 'en-home' , eg. '../en-home/products', I think this was taken as a default option. (this happened several months ago, so I do not remember exactly...). Now I want to change this segment simply to 'en'. However, in 'Pages...Settings', only the part AFTER 'en-home' is editable, so I do not see any possibility to change this segment. Neither do the Languages Settings offer such a possibility ;-(( Or do I miss something?
  7. Hello, I am programming a pw app with multi language support. I successfully created all pages in german and english. In the admin page I somehow got the pages overview with the english titles. What do I have to do in order to have displayed the german titles?
  8. Hi, I am just working on a multilingual site (german-english). For each german page I created a corresponding page with english titles. On the german site, all menue items (i.e. titles) show up properly, on the english site however only the first item (Home) appears. Did I miss something?
  9. Hello, in one of my templates I use url segments. As allowed url segments I have: regex:[0-9]+ regex:[0-9]+/.*$ regex:[0-9]+/[^"]+ When I use an url with the second/third pattern, it works fine as long as there are only letters and digits. But when the url contains a '+' or '%' (urlencode!) I get a blank page. .../1234/abcd > works fine ../1234/abcd+5 > outputs a blank page. ../1234/abcd%5 > outputs message: Bad RequestYour browser sent a request that this server could not understand. any suggestions? EDIT: I just found this from Ryan: https://processwire.com/talk/topic/580-encrypted-urlsegment/ In addition to the expected forward slash to separate directories, ProcessWire only accepts these [ASCII] characters in it's URLs: abcdefghijklmnopqrstuvwxyz 0123456789 . - _
  10. Hello, I want to have the items in the main navigation menu in a specific order. I found the option "Children are sorted by drag-n-drop", but after saving this option, the selectbox was reset, with an empty string preselected. Neither could I change the order of pages by drag and drop.... any suggestions?
  11. Thanks Dave, you are right. when the temperature goes over 30 degrees Celsius (here in Germany), such things can easily happen......
  12. Hello, I have a form for displaying, editing and deleting data of contact persons. The parameters are parts of the url (url segments). As url segments for the template I have entered: new edit delete regex:^edit/[0-9]+ "new" and "edit" work fine, but when I use "delete" I always get an 404 error. Strange thing is that if the url only contains "delete" the script is properly invoked (but cannot process properly without id). However, if the url contains "/delete/123/", then I always get the 404 error. I am really stuck :-( any suggestions?
  13. In the templates folder I have a dummy template 'werkedit.php' and the file containing controller function and business logic 'werkeditCtrl.php'. this last one is the Alternate Template File. Inside the templates folder is a "view" folder containing the markup file. This last one is here not relevant, because it's not invoked. The question is why is 'werkedit.Ctrl' invoked only when there is NO id in the url? There are no other considerations like those mentioned by you.
  14. Hi, I have a template file to which I assigned an Alternate Template File. But when I enter the url in the browser a blank page is showing up. There is no entry in the log file and no other error message which could give me a clue. Even when I remove the Alternate Template file, the default template is not being invoked. any suggestions? EDIT: the last part of the url is a numeric Id. When I skip the id, the script is being invoked and outputs a debug message. WITH the id in the url I get a blank page. However, I allowed URL Segments for this template...... EDIT: case is settled: the error stems from a needless slash in the regex expression for allowed url segments...
  15. Hello, I have a template (mytpl) to which I assigned an Alternate Template File (mainTpl) which contains the business logic. From there I call /templates/views/mytpl.php . Now I have the impression there is something messed up: suddenly the template only delivers a blank page. So I inserted a debug message in wire/core/TemplateFile, function __render: echo "out = $out" (just before return) and saw that there is a double output which however is not being displayed without the debug message. How can I fix this? Can I have view templates without declaring them as pw-templates, just calling them from the mainTpl?
  16. Hello, Sometimes I get an "Internal Server Error" due to an "Integrity constraint violation". I could not find out the cause of this error (it' s somewhere inside the pw core) but fortunately this error does not affect the data processing, the whole process is working properly. But of course I want to suppress the error message. In the config file I set the debug flag to false, but to no avail. Any suggestions?
  17. The problem is that there are two modes: in the first mode there is no submit, the form will just be displayed (coming from another page). So it can be totally correct, that there are no input values. Only in the real submit mode there must be input values.
  18. Hello, I have a form which worked fine with when submitted by a submit button. Then I had to replace the submit button by javascript document.myform.submit(). But since then $input->post->submit returns false albeit the $_POST array contains correctly all form values. Any suggestions? Update: I replaced $input->post->submit by $input->post, but now $input->post *always* returns TRUE even when there are no form elements....
  19. Hello, when I use a certain template, I get the error message. Error: Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'myTemplatename' for key 'name' (in .../wire/core/WireSaveableItems.php line 238) When I switch from "Use Compiled File - No" To "...Auto" or viceversa the error message does not appear for a while, but after an hour or so it reappears. I suppose this has to do with the fact that I am using one template which contains the business logic and two view templates which are assigned by $page->template->name in the first template. For the first view template I assigned as Alternate Template Filename the file containing the business logic, for the second view template I made no such assignment. Any suggestions?
  20. thanks, now it works like a charm. it was just a question of using the right regex syntax.....
  21. thanx for your suggestion. Tomorrow, in the office, I will try this (now I am at home and going to sleep ;-)) Nonetheless I find strange that the script is not even invoked when there are two url segments....
  22. Thanx for your help, but this code will not bring us further. If there is a second segment, the script is not even being evoked, I just get a blank page....
  23. I am just doing this: if($input->urlSegment(1) == 'edit'){ ...... } ...and this works if there is only *one* segment (edit). If there is a second segment, the script is not being evoked....
×
×
  • Create New...