Jump to content

cpx3

Members
  • Posts

    128
  • Joined

  • Last visited

Everything posted by cpx3

  1. AndZyk, I found the solution. For whatever reason, the file compiler option was deactivated in config.php, so the templates were not compiled...
  2. Hi fellow programmers, I have a strange problem: when I try to use any functional field I get the error message "undefined function"__richtext()" or whatever I try. As soon as I include <?php namespace ProcessWire; ?> in my template files, everything works fine. The _init.php file exists and is not excluded, the same is true for ready.php and they seem to get included. Any ideas? Thanks, Bernhard
  3. Thanks again for the answer. Actually I only called that selector on a testpage which had nothing on it than this selector plus pages->find. The solution for the moment was to add a "minimum date" (i.e. created>date_minim) which seemed to be the only possibility to increase speed. The interesting fact was however that the same selector with the same data (I did not change anything) worked from 1000 ms to 80000 ms.
  4. Hi to all, I have a quite strange problem. If I open a page that contains the selector select_countries=oesterreich, begin=(start_date=''),begin=(start_date<=today),end=(end_date=''),end=(end_date>=today), template=template-news, checkbox_not_startpage=0, select_categories!=tipps|shortcuts, id!=, limit=5, sort=-created things get so slow that I usually need to restart the whole server to be able to login to PW-admin. I attached the profiler output of the function and you can see that with the exactly same data the output time goes up to minutes... Any idea? When I put the selector in the debugger it has an execution time of about 1200 ms. The problem only seems to appear when the selector is (the first and only) part of a function. Any ideas? Thanks in advance, Bernhard
  5. Thanks for the great help everybody!
  6. Thanks once more for the answers! My problem is that I have no idea how to get the value of select_countries.title (which is a referenced page). I tried (beside many variations): foreach ($items as $p) { echo $p->select_countries.id; } But with no results...
  7. Thanks to everybody for the answer! I tried findRaw which seems to be the most effective but brings me to another problem: How to access page references? I have the following code: $items = $pages->findRaw("template=template-news, select_region=austria, limit=2, objects=1", ["select_countries" => [ "id", "title" ]]); where select_countries are referenced pages. But I have no clue how to access the select_countries id as it neither works with array[0] nor with select_countries->title...
  8. Hi there, to display a single slide from a huge database I only need a single page. But when I use the selector $pages->findOne("template=template-news,start=1,sort=created")->title; the selector seems to ignore the start position and always returns the same page. As the docs specify clearly that findOne has the same options as find, I have been trying to find my mistake for the last four hours with any success... (I cannot use find as this slows down things extremly). Any ideas?
  9. Thanks anyway. I supposed it would as it is possible to exclude them. But they are definitely the source of the problem.
  10. @wbmnfktrThe problem seems to appear only when url segments are activated. Is there anything I oversaw?
  11. Thanks for the hint, I reinstalled the module and did everything as described but it still does not count anything...
  12. Hi @David Karich, first thanks for the module I learnt to love on many sites. Today I installed version 2.0 on a new site and even if I see the script and the tag in the body tag nothing is beeing count. Any idea what I am doing wrong? (I accessed the site from five different devices).
  13. Thanks for the incredible support here!
  14. Adrian, thanks for your reply. I actually disabled both of them (by uninstalling the SessionHandlerDB module). It became slightly better but now another problem appeared: The selector "select_regions.name!=schweiz,select_regions.name!=liechtenstein, template=template-news, start=1, limit=1, sort=-id". Any idea what might be wrong?
  15. There seems to be a problem with the sessions. I always find the error message: Error: Exception: Unable to obtain lock for session (retry in 30s) in my log and the page seems to be delayed. I commented out all the sessions but it does not become better. Maybe there is no relation between that and the update but the problems occured immediately after updating PW.
  16. I did the update, now I cannot even login to PW anymore as the admin is not loading... (I restarted the whole server but it does not help at all). Any other ideas?
  17. Yes, I did! Thanks for the hint, I will immediately update it!
  18. Thanks for the support! I tried everything, including a complete new installation, but the update seemed to be a coincidence. Actually the error message I found in the logs was the following: "Error: Exception: Unable to obtain lock for session (retry in 30s)"... When not using any sessions it seems to work.
  19. After installing the update unfortunately the site does not load anymore. Neither the frontend nor the backend seems to be accessible anymore, everything freezes while loading...
  20. @flydev Merci beaucoup (also for your wonderful modul!) Eventually I found the problem: it was a missing trailing slash in the url segment, although the setting was to either / or. Thanks to all of you for the support!
  21. I do not use ProCache in this project but in another, so is good to know that it might cause troubles (I never read about that). I need sessions for navigation as I do not want urlSegments on the startpage and I need to know which in which „area“ of the page the user is (the menu depends on that). Any other idea?
  22. Oh, thanks for the hint! How do you replace sessions to work with Procache? (I use that, too)
  23. wbmnfktr, thanks for your answer! Actually I have not a general problem with urlSegments, they work. When using urlSegment1 on www.domain.com/seg1/seg2 it works fine. The problem appears when I save this urlSegment1 to a session and then call a page www.domain.com/ with NO urlSegment, the session value is changed to "assets" even I tell PW to change the session value only if strlen($input->urlSegment1)>0. This only happens when I want PW to leave the session value alone... It must have to do with urlSegments (#3 for example gave me the path of an image file) as the problem does not occur with any other value.
  24. Hello! When I try to get an urlSegment of a page that has no urlSegment (i.e. www.domain.com/ ) the value is always changed to "assets". When trying to receive urlSegment2 (that also does not exist) I get the filename of an image. Any idea what I am doing wrong? Thanks in advance, Bernhard
  25. Hi co-programmers, I try to write the value of an url segment to a session. All works fine as long as there IS a segment, but the moment there is no segment, my values are set to empty or to "assets". My code is if ($input->urlSegment1 && !empty($input->urlSegment1)) {$session->set("region", $input->urlSegment1);} I just want the session-value to be left alone when I go back to the start page (which has no segments) and not to be changed. Any ideas what I am doing wrong? Thanks, Bernhard
×
×
  • Create New...