Jump to content

celfred

Members
  • Posts

    193
  • Joined

  • Last visited

Everything posted by celfred

  1. @BrendonKozSorry about the long delay ! I'm just coming back on this forum and I let that issue on the side because the end of the school year is hectic… And I must say I'm still waiting for an answer from the technical teams of the academic services ?. So everything still work on my 'old' Tuxfamily url (and this is the site I'm using 'live' with my pupils), but today, I can still notice 'time out' operations (with the exact same site) on the ac-nancy-metz.fr url (even in the backend !), and I am still unable to delete some of the folders… I will try again to contact someone and try to advance on this issue before the summer holidays, and I keep a tab open on this thread to keep you updated ? Thanks for your concern.
  2. @gebeerThanks for your long reply which I am reading only now. I have other things to do right now so I'll come back on this later and try everything you said and edit this post to let you know how it goes. Edit : I have eventually managed to uninstall Process Login History by doing what @gebeersuggested (rename, then missing > remove from database). The problem persisted… I have also checked the XHR response with Firefox and got the « server error » after about 60 seconds trying to load the pages tree… I guess I won't have any answer from the host admin until next week ? I have no idea what else to try. I have tried everything I could think of (htaccess modifications, uninstalling modules, removing parts of my site to limit server loading…)
  3. Keep adding infos : I can confirm that as a guest, the site works as expected. I can follow any link and the result appears quite fast. As soon as I log in, everything gets stuck quite fast (except pages that had been already cached somehow)..
  4. Well, poor feedback for now, sorry… My site is still not working. And I'm completely stuck. I have contacted the host admin to see if he has an idea (weird thing : my site folder has 770 permissions and I can't change it via FileZilla although it belongs to my user/group and I have put it there myself (twice ! and I can't delete the old folder site_), the same for assets_ !) Anyway, I constantly have 'server error' too many SQL connections. I've tried avoiding my LazyCron jobs in my _init file. Not better. I've noticed that if I delete all cache/cookies, I can get to the login age for the backend. When I log in, twi cookies get installed : wires and wires_challenge. I go to the backend (as a teacher) but Pages Tree never loads and then I get the Server Error whenever I go to antoher page. If I manually delete the 2 before-mentionned cookies, I can do the process again. If I log in as Admin, the Pages tree loads fine and all backend works fine. I have no idea why such a different behavior… As admin though, I was able to unsinstall some modules as stated in my previous posts, but if I try uninstalled Process Login History, I get the « Server error » (after about 60 seconds) and this module stays there… (that's how I have notices my permissions issues I've talked in the beginning of this message). Sorry for this « messy » message again, but I'm losing myself (and my site) on these issues… I have no idea if it's a server problem or a problem on my side (or both) and it's killing me… I try to be patient and wait for an admin to answer my questions about those file permissions issues. Meanwhile, I keep trying some stuff, reading around the forum trying to find clues… And I give little news here in case someone has a clever idea or stays interested in how this situation will end up ? Thanks anyway for taking the time to try and unserstand my worries. Edit : After wandering in the backend as admin, I click 'View site' and get the "server error"… Insisting a little, it eventually works and comes back on another page… driving me crazy ! Edit 02 : In fact, the error is « Proxy error » and has a 502 mention in my debugging tool (which I don't really know how to use, sorry…)
  5. If I uninstall SessionHandlerDB, I get the following error : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pa-local.sessions' doesn't exist I've tried to empty cache, I can't get anything to work…
  6. Other idea. Could it be some sort of conflict with the «tableSalt» which can be found in config.php ? And which was not on remote site wit PW 3.0.200 (and an 'old' config.php file). Can I empty the 'sessions' database safely ?
  7. As a follow-up : I have contacted the administrator and he solved part of the issues. He managed to import my database Sql file (which was too large (?) to be imported via PhpMyAdmin). The site seems to work although I had an "Unable to obtain lock for session". I eventually managed to get through (reloading several times, straight to the admin backend) and all went well then. But logging out and back again as a teacher, the error came back… I saw a similar post in the Forums about this. TracyDebugger is disabled… Wonder if he issue could be due to the SessionHandlerDB module or my site optimization (which could be immproved, for sure !)… And to anwser @BrendonKoz, there is a proxy server, but I have no idea what this implies !
  8. @netcarver: Thanks for your quick reply ! I use Firefox as well (and I've just tried from another computer with Firefox as well) : same troubles… The in-cache pages are ok, but if you go one the Newsboard and then click on a pupil's name (to go the his or her profile page), it loads for ever until the error occurs… And if I try to log in, the same error triggers again (I suspect because after logging in in the front end, I redirect to that Newsboard which has quite a lot of content). To log in to the backend, I type the /admin url and use PW login form. But then again, it happens that I have to wait for the eoor, then clean cache and cookie and/or come back by hard typing the backend url. Regarding the modules : Croppable Image 3, Leaflet Map Marker, Front End Edit Box, Limit Repeater, Login Notifier, Clean Empty Page File Dirs, Pages2Pdf, Changelog, Database Backups, Hanna Code, Login History. I had a problem with Hanna Code while migrating and the table is absent in PhpMyAdmin. I haven't managed to solve this issue yet. Could the Session DB handler (which I use as well) be a cuprit ? (But I think it breaks things a little if I turn it off). Another weird thing I had to face while migrating : file permissions error. Even though I set my config.php to 775 and 664, my FileZilla indicated 770 on assets/ directory and kept telling me 'permission denied' when I tried to change that. I had to rename the assets/files/ and put that directory back to load all my assets files. I can see though that my pages seem to be written in assets/cache/pages so I guess the problem is solved on that side (?). It is really a brain-teaser (and I guess that's an understatement ?) to me ! And I can't see any errors in the logs files (when I manage to get to it through the backend)… When the site starts looping, I can see a 'lock unabled' (can't remember the exact line) error.
  9. Hello, I'm desperately trying to re-install my site on a new (more official) host and I've been struggling for 3 days with poor results… The server keeps kicking me out when I go to a new page. If a load occurs, it then works quite well thanks to cache management. At first, I thought about a problem on my side since I'm not an expert at coding and thought that as my site was getting bigger with my pupils, it was not optimized in fetching data and I was trying to improve that. But : everything works fine on my localhost. everything worked (and is still working) fine on my previous webhost ( https://planetalert.tuxfamily.org ) although loading time is a little long. the backend throws the error as well !! And that's what surprises me. If backend doesn't work, I feel like my poor coding skills are not the culprits ? But then I have absolutely no idea of where to dig now and I am quite annoyed of seeing my site (which was getting more popular with my pupils and also getting more popular with my colleagues) not being able to be launched on the academic server ( https://sites.ac-nancy-metz.fr/planetalert/ ) ? So if anyone could give me some kind of help on that, I would greatly appreciate. I'm ready to grant all admin access to someone willing to help beacuse I'm really stuck on this. If the code is needed, my templates files are available here : https://forge.apps.education.fr/flenglish/planetalert Thanks ! PS : I have read many posts on this forum trying to find hints. I've disabled Tracy Debugger and things were a little better, but still… backend doesn't work as expected. Whenever I modify a page and click on 'Save', I get a server error (error 429)
  10. Well, after some more research, I still don't get it. My page template's cache is set to 'disabled' (I don't use Procache) and I can't find any place where I would set some cache for this part in my code, but when I do $pages->unCacheAll(), it gets rid of about 100 things and then my code works… So I guess I'll keep losing my hair, but now I know where they go : it's a cache issue ? I'll try to find some resources explaining how that works. Bye !
  11. Ok. So one thing you've just written triggered an idea and made me closer to understanding the issue ? I added : $pages->unCacheAll(); in my template just before calling my method getPosPlayer() and now the weird behavior I related is back to normal : 24 players initialized all the time and my initial filter() way of doing things worked as expected. So it is a cache issue ! But I (for the moment) don't know where it comes from. So I'll dig this cache thing and try to find a way to explore what is being cached (and why). Thanks a lot for your help.
  12. Thanks again for the explanations which is somehow what I do for debugging. I 'follow' my var using bd() and that's what surprises me when I use filter() as explained mentionned above : first loop : $teamPlayers->count() is 24 filter() reduces it to 3 $teamMates, 2nd loop, $teamPlayers initializes back to 24 (as expected) and filter() reduces $teamMates to 3, 3rd loop, $teamPlayers initialize at 3 (???). And after a couple of other loops, when filter() reduces $teamMates to 1, $teamPlayers stays at 1… And I can't explain this 'destructive' mode that never comes back to the initial value. The 'child' thing is just the page where I save the bestTime field for a player. Anyway, I think you've spent enough time trying to help me and I, again, thank you very much for this. I guess I'll have to further dig this filter() method (which I thought I eventually grasped since I use it somewhere else in my code ;)). Maybe things will get better as my skills improve with time.
  13. Hello @virtualgadjo Thanks a lot for your answer. I thought I subscribed to the thread but it didn't work so I am seeing this answer just now. Sorry… I understand your point and tried to look at my issue again. If I got it well, I tested : $teamPlayers = $teamPlayers->filter("bestTime>0")->sort("bestTime"); and this should work the same as what I did with teh $teamMates var, but… It doesn't because my $teamPlayers var seems to be gradually destroyed by the filter() method. And that is exactly what I don't understand : why doesn't it come back to 24 when I repeat line 1 : To try and be exhaustive in my explanations, My structure is like this : in my template, I have a foreach($allMonsters as $m) listing all 'monsters' for a particular monster ($m), I call the method getPosPlayer() trying to get the position of a player according to his or her best time In the getPosPlayer() method, I call getAllTeamTimes() method in which there is the code I mentioned in my first post (hence the part responsible for finding all team players (which doesn't return 24 after a few loops using filter()…which seems to degrade $teamPlayers var although on line 1 of that method I initialize it - or at least I wish I could initialize it ?) Anyway, if I don't use filter() it works, but I wish I could understand what's going on… Thanks again for helping !
  14. Hello, I can't understand how this destructive filter() work. Here's my code (with annotations to explain my issue) : $teamPlayers = $pages->find("parent.name=players, team=$team"); bd($monster->name.':'.$teamPlayers->count()); // There should be 24 players in my team (which is the case on first call) foreach ($teamPlayers as $p) { $result = $p->child("name=tmp")->tmpMonstersActivity->get("monster=$monster, bestTime>0"); if ($result) { $p->bestTime = $result->bestTime; } else { $p->bestTime = 0; } } $teamPlayers->filter("bestTime>0")->sort("bestTime"); // I want to return only the list of players having a best time on this monster return $teamPlayers; My problem is that after several calls (for all monsters) the number of players in the team is not 24 but 1… I guess the $teamPlayers never resets and I can't understand why line 1 doesn't start with 24 again… If I code this for the 2 last lines, it works : $teamMates = $teamPlayers->find("bestTime>0")->sort("bestTime"); return $teamMates; But I would like to understand what's going on with my 1st version (I guess it is the destructive aspect of filter()) ? So if someone could take a little time to explain, I would appreciate ?
  15. Hey there, I don't know if this might help smeone (and if I did it the right way), but I had an issue as follow : all maps worked on my site except 2 monuments which didn't show any map. I noticed they had a single quote in their name and if I got rid of it the map appeared. I then ended up doing this (in my '$opitions' array) and it worked : 'popupFormatter' => function($page) { $page->title = str_replace('\'', '\\\'', $page->title); // Dirty hack (no map if single quote in title) $out[] = '<strong>'.sprintf(__('In %1$s, in %2$s'), $page->city->title, $page->country->title).'</strong>'; $out[] = "<p class=\"text-center\"><img src=\"{$page->photo->eq(0)->getCrop('thumbnail')->url}\" /></p>"; // ** NB: Use escaped double quotes if HTML attributes needed ** return implode('<br/>', $out); }, Again, it might sound a bit hacky, but it works for me and maybe it can be useful to someone...
  16. Hello, I am still using this module a lot on my site but I would like to avoid the reloadign of the page. Is this possible ? Let me explain : I use edit links as follow : foreach($concernedPages as $p) { echo $p->title.' '.$p->feel(array("text"=>"[Edit]", "fields"=>title,image,summary,level")); } So as you may imagine, I have a list of pages titles accompanied by an 'Edit' link. When I click this edit link, a lightbox opens up and I can edit the page.and this works fine BUT, when I hit the 'save' button, my lightbox closes and I wish the current page (which is not the page I have just fronend edited) would NOT reload as well. Would there be a way to test if the current page is the edited one and reload if true, but prevent reloading if false ? Or simpler, just manually set reloading to false when we want it, resulting in the following code : echo $page->feel(); // THIS WOULD RELOAD CURRENT PAGE AFTER EDITING foreach($concernedPages as $p) { echo $p->title.' '.$p->feel(array("text"=>"[Edit]", "fields"=>title,image,summary,level"), 'reload'=>false); // THIS WOULD PREVENT RELOADING (NOTE THE EXTRA PARAMETER ADDED TO ILLUSTRATE MY POINT } Thanks for helping ! PS : I hesitated on creating a new post but eventually decided on following this thread (I have read the complete thread but couldn't finc anything concerning my question) EDIT : Eventually, I guess I've found it myself (and it wasn't so hard) adding this in my main JS file : var FEEL = { onBeforeReload: function (o) { return false; } };
  17. As a follow-up, @ryan had a look at this and made a patch that somehow tests the Mysql version and does something that makes it work fine (at least on my localhost). Technically speaking, I am unable to explain all this, so I prefer let the pros give details if needed, but just know the issue seems solved. As I said on Github, I am quite glad I have been able to somehow contribute to the community. You all have provided me with so much help since I have discovered PW. THANKS again !
  18. @kongondo Great idea ! I've just tested and it works with other fields : title, summary... No problems (apparently). As soon as I change to "name~=", the error triggers. I'll go ahead and write this as well on the 'bug' report.
  19. @kongondo I'm just noticing that my previous message didn't go through... I was saying that for your information, I had replaced all my ~= operators with either ^=, ~*= or = depending on my use cases. It did the trick although I'm losing the original 'whole words' searching capability... but at least I'm not stuck ? I wen tahead and submitted a 'bug' issue as you advised. Not sure this is a real bug since I have a feeling somebody else would reproduce it if it was, but I di dmy best explaining the issue and I hope it can help ! If anybody needs more information about it, just ask. I'll keep an eye on this issue since I would like to understand and solve it in a better way ! But thanks again for your help !
  20. @kongondo Thanks for your reply. Ah... And downgrading MySql doesn't seem possible (at least for my low skills... - https://dev.mysql.com/doc/refman/8.0/en/downgrading.html So I guess I'm gonna be in trouble here...
  21. @kongondo Thanks for your reply. Ah... And downgrading MySql doesn't seem possible (at least for my low skills... - https://dev.mysql.com/doc/refman/8.0/en/downgrading.html So I guess I'm gonna be in trouble here...
  22. So nobody has any clue for me ? ? On my localhost, I have : PHP version is 7.4.3. MySQL version is 8.0.21. Maybe this can help... I have a feeling if it was just a configuration problem, all requests should end up with the 'illegal argument to a regular expression' error ? But I can't imagine PW would be the cause (otherwise I vould get some clue from the community, I'm sure ?)
  23. Maybe this can help. The error points to this file/line. File: .../wire/core/WireDatabasePDOStatement.php:166
  24. Hello, I've just upgraded to 3.0.165 (and updated my Ubuntu version as well) and on my localhost, I am facing a weird issue : all my requests having the ~= selector cause a Mysql error with this message : PDOException #HY000 SQLSTATE[HY000]: General error: 3685 Illegal argument to a regular expression. I have no idea what is going on. If I change my request from $visualizer = $pages->get("name~=visualizer"); // Triggers the error to $visualizer = $pages->get("name=visualizer"); or $visualizer = $pages->get("name~*=visualizer"); My code works fine again. Any idea ? Shall I change all my requests (but from what I understand by reading the documentation, ~= exists and fits my needs : all words in any order [though I do understand that in my example above it may be useless since I have only one word]) Thanks !
  25. Hello, Just a mention that today I have received this newsletter from The Whale : https://thewhale.cc/91 And Processwire is part of it ?
×
×
  • Create New...