Jump to content

helmut2509

Members
  • Posts

    110
  • Joined

  • Last visited

Everything posted by helmut2509

  1. Hi, I have a template to which I have assigned an Alternate Template filename. To the respective url I added two urlSegments '../edit/123' . In the url segment list I added : "edit" and "new", config->maxUrlSegments = 2. As long as I only add *one* url segment (edit), it works fine, but when I add two segments (.../edit/123) a blank page appears, without error message. The alternate template file is not even being evoked. what' s wrong here?
  2. The cache status of all templates is already set to "disabled". What do you mean by *namespace issue*? What do I have to check?
  3. to what avail? the file functions.php apparently exists and is being loaded.
  4. In one of my templates I had a function and as this function serves also general purposes I saved it in an external functions.php. This functions.php was included_once in the template. But then I got an error: Cannot redeclare function.. previously declared in /var/www/..../site/assets/cache/FileCompiler/site/templates/ I deleted this cache folder, but to no avail :-(( So for the moment I see no other solution than to put again the function into the template file... Any suggestions?
  5. I just found out that it was my fault :-( Now it works, thanx anyway....
  6. yes of course. The redirect is pointing to a page inside my pw app, there is no subdomain. $session->redirect("/my-pw-page/");
  7. Hello, I just found out that after invoking a $session->redirect the contents of my $session variables got lost. There has already been a posting to this subject three years ago, but nobody suggested a proper solution. Do I have to assume that this is a pw bug and that I have to use $_SESSION instead? thanx, Helmut
  8. I tried both of them : "include" and "include_once" but the error persisted. I don't know how PW's file compiler works and if deactivating it would solve my problem...
  9. Hi, I wrote a custom php script functions.php which I saved in a folder tslib (same level as templates). But when I included the script and called one of its functions I got this error: Error: Cannot redeclare getLandById() (previously declared in .../site/tslib/functions.php:16) (line 16 of .../site/tslib/functions.php) Moreover, processwire automatically changed my inlude statement to include_once(\ProcessWire\wire('files')->compile('../tslib/functions.php',array('includes'=>true,'namespace'=>true,'modules'=>true,'skipIfNamespace'=>true))); How can I fix this???
  10. thanks for your quick answer. I played a little with the code and suddenly it was working. As I used another naming method before, I probably got the wrong result from the browser cache. thanks anyway!
  11. Hi folks, I have a form with repeated fields, so I am using the array notation in naming them (name="myfield[]"). I also use this for naming a hidden field. When I catch the contents of the form using the pw $input->post variable I properly get the contents of all arrays except the contents of the hidden field array. The hidden field array is completely empty though before submitting the form all hidden fields were populated. Is there a pw bug or did I commit an error in handling the fields? thanx, Helmut
  12. Now I got it. PW takes the Module name neither from the file name nor from the folder name nor from the class name but from the getModuleInfo function, which I have copied from a sample code.... Sorry!
  13. yes, the module extends the class WireData: class MenuMaker extends WireData implements Module
  14. Hi, I am just trying to write a module following the respective instructions. After having uploaded the module I did a Module Refresh, which popped up a PHP syntax error (which was in my module). After having fixed the error I made again a Refresh, but the new Module did not appear. Then I used the "Add Module From Directory" Function but the new Module was not found. It's strange that PW detected a syntax error in the new module but not the module itself.....
  15. When in the Admin page I click on the Module tab I get this error message: "Error: Class 'ProcessWire\AdminTheme' not found (line 3 of ..../wire/modules/AdminTheme/AdminThemeReno/AdminThemeReno.module) " Any suggestions how to fix this?
  16. thanks for all your suggestions. I also found out this: https://medium.com/@clsource/the-wire-render-pattern-806bf6d6097a#.82as32ldy which seems quite interesting. Now I will check and find out which solution suits my needs best...
  17. Hello, I am just programming a pw application with user forms and a lot of data processing (getting data from webservice, sending to webservice etc..). Now I don't like to mess up the Html in the templates with business logic, I want I neat separation of concerns. Are there any *best practices* how to handle this with processwire?
  18. I set $config->debug = true, but the missing semicolon did not cause an error message, though..
  19. Now it works. The cause of the error was probably a missing semicolon after the echo command and the incorrect page was cached. Therefore the adresse_id was not displayed even after the patch.
  20. It is being displayed when it is hardcoded. The above script is included that way: $adresse_id = 123; include('./callAdresse.php');
  21. When I use the full URL, it works. Even the adresse_id is being passed but only when it is hardcoded in the above script. When it is inserted with <?php echo $adresse_id; ?> ..it still gets lost :-(
  22. adressdaten is the part of the url which you define when creating the page. But THIS works as the form is properly displayed.
  23. Hello, I am just writing a pw app. After successful login the program shall switch to a form with address data, passing an id to the script (which is a pw template). How can I pass the id by POST to the address form? To this purpose I included the following script: <form name="myform" id="myform" method="post" action="../adressdaten"> <input type="hidden" name="adresse_id" id="adresse_id" value="<?php echo $adresse_id; ?>"/> </form> <script type="text/javascript"> document.getElementById('myform').submit(); </script> ..the problem is that that the form is properly displayed, but the id got lost. it is neither in $_POST nor in $input->post->adresse_id. Any idea about how to pass the id?
×
×
  • Create New...