Jump to content

celfred

Members
  • Posts

    184
  • Joined

  • Last visited

Everything posted by celfred

  1. @adrian Thanks for your reply. My site is at http://planetalert.tuxfamily.org . I have just installed TracyDenugger there. It doesn't appear but from what I've read in the settings, that's normal, everything is stored in log files. Ok, but how do I give you access to useful things (admin access?). Sorry if you feel like I'm messing things up and being a nuisance... Actually, I've just tested 1 thing : forcing the DEV mode so I can see Tracy's bar. I saw the 'Processwire Debug Panel' and clicked on the 'Pages loaded' link, and it went to my 404 page like I said... I turned the setting back to DETECT. Feel free to tell me if you want me to do some things or to private message you some logs or whatever... Edit : PM sent. Thank you so much.
  2. @kongondo : I was definitely thinking of starting a new topic and ask you, guys, about my optimisation issue, but I wanted to find some clues by myself first... and believe me, I am trying to find something (hence my discovering of TracyDebugger ) but at the moment, I stay also curious about why I have to load 5000 pages ! (Except I am the creator of these pages, so this is rather shameful...) So I'll start a new topic soon ! But I still think the expected behavior of my TracyDebugger shouldn't be to redirect me when I click on the 'Pages loaded' link, no? Edit : WHile I'm at it, the 'Show bar in backend' option is NOT ticked and the bar displays in backend anayway And it triggers the 'Fatal Error Maximum function nesting level of '100' reached, aborting!'... Do you think I did something wrong? Should I try and re-install the module?
  3. Hi everyone - Absolute newbie question (I'm discovering the module and actually I'm also discovering PHP debug stuff, so sorry if my question is rather stupid) I've just installed the module and it loads fine on my localhost with the bottom bar. If I look at the 'Processwire Debug Mode' (which I've set ON in my config.php), I see many infos such as 'Pages loaded', 'API Variables', 'Session'... with numbers. I'm very interested since I have a page which loads 4991 pages and so takes quite a long time (and I'm desperately trying to optimize it), BUT, and here's my problem : if I click on the link to see the pages, the menu drops down (cool!) but it triggers a page load which in its turn redirects immediately to my 404 error page... and I lose the current information I am spending quite a while trying to understand how to dive into this PHP debug tool (I have to admit it's for the moment way over my coder's skills), but here, I'm a little stuck on what seems to be... not much. So if anyone can give me hint on that one, I'd appreciate. Thanks ! PS : Maybe I should have opened a new question in the forum rather than following this topic ?
  4. Hello, I'm facing this issue at the moment... A PHP script that seems to take too long and the browser returns a timeout. Flushing works fine on my localhost but doesn't on remote I have no idea what I can do, so if @renobird or anybody else has some advice, I would appreciate Thanks !
  5. Thanks for the replies ! I had tried the OR statement before (like Robin S mentionned), but I had an issue because of those players having 2 places and 1 people and not being concerned (or 1 place and 2 people), but Kixe showed me the way by adding all possibilities in the OR statement. I hadn't thought about this possibility. Anyway, that would be more difficult if I wanted to pick players having more than a cumulated 10 number of free elements. I guess I would have to use my first 'foreach' solution in such a case. Thanks again for your ideas !
  6. Hello, I'm having a little question with this part of code : $rank = $pages->get("template=team, name=$selectedTeam")->rank->name; if ( $rank == '4emes' || $rank == '3emes' ) { $allPlayers = $pages->find("template=player, team.name=$selectedTeam"); $allConcerned = new pageArray(); $notConcerned = new pageArray(); foreach($allPlayers as $p) { // Find players having at least 3 free elements if ($p->places->count()+$p->people->count() >= 3) { $allConcerned->add($p); } else { $notConcerned->add($p); } } $notConcerned = $notConcerned->implode(', ', '{title}'); /* $allConcerned = $pages->find("template=player, team.name=$selectedTeam, (people.count+places.count>=3)"); // Find players having at least 3 places OR 3 people */ /* $notConcerned = $pages->find("template=player, team.name=$selectedTeam, (places.count+people.count<3)")->implode(', ', '{title}'); */ It works fine the way it is, but I just want to make sure that the commented part is not possible with PW (yet?) : having a selector such as people.count+places.count>=3. I feel like it would be more concise and more readbable/maintainable (2 lines instead of 11). Thanks in advance for your insight and advice
  7. Thanks for the answer. HP field can be less than zero. It is an 'Integer' field that holds a negative value when the task is... negative so I'm not sure why it doesn't return the expected result. I like the 'break;' tip. Again, I have a feeling I have missed that 'basic' one in my slow discovery of PHP (and coding)... Sorry about that. Anyway, I'm not at home right now, but I'll do some testing and come back here to edit my post and try and understand something about this nextUntil(). Thanks again ! Edit : After testing further and struggling about half an hour, here's my mistake : prevUntil() was what I was supposed to use (I feel a little bit ashamed...) Yes. I guess my 'sort=-date' in my previous statement was the clue. What I imagined being my first event (hence my nextUntil) was in fact my last event, that's why prevUntil was to be used... Eventually, the most readable code (to me) is your 'foreach' with the 'break' instruction, so I'll go with that Thanks !
  8. Hello, I'm stuck with a nextUntil() use I can't figure out. The following function works if I use the commented part instead of the last 2 lines (with nextUntil). function checkStreak($player) { // Set Ambassador skill if necessary $ok = 1; $streak = 0; /* $lastEvents = $player->get("name=history")->find("template=event, sort=-date")->not("task.name=donated|donation|absent, limit=10"); */ /* foreach ($lastEvents as $e) { */ /* if ($ok == 1) { */ /* if ($e->task->HP >= 0) { */ /* $streak++; */ /* } else { */ /* $ok = 0; */ /* } */ /* } */ /* } */ $lastEvent = $player->get("name=history")->children("template=event, sort=-date")->not("task.name=donated|donation|absent")->first(); $streak = $lastEvent->nextUntil("task.HP<0")->count(); return $streak; } But I know it's ugly and... I sometimes wish I had a tutor to help me improve my coding style In words, what I'm doing is : - Check the last events recorded for a 'player' - I want to check the number of positive events in a row (before a negative occurs) - My function gets the last 10 events (the limit to get a bonus) and checks each one, but stops if it encounters a negative event and return the streak. BUT : looking at the API cheatsheet (thanks @soma), I've noticed this nextUntil() which I would like to use... but my use always returns 0 If someone can understand why and help me improve on that one, I would appreciate. Thanks ! By the way, feel free (if you have a few minutes) to give me advice on how to improve those foreach() I feel like I'm overusing...
  9. Hello, I'm struggling with this : a 504 Gateway Timeout when generating my PDF. I used to be able to generate a particular PDF listing 52 places with a photo (small), a little text and a few pieces of information for each in a table. It worked and I had a PDF of about 350Ko. Now, I'm trying to generate a PDF of about 250Kos and I get the 504 error. I've tried to re-generate my places catalogue and again, I have the 504 error. All my templates work fine (although it takes a little while) to generate smaller PDF files. The page I'm trying to generate is : http://planetalert.tuxfamily.org/players/4e/amandine If someone have advice on how I could find my way out of this, I'd greatly appreciate Thanks !
  10. Thank you so much ! I can't believe I've passed through this one... It caused me a real headache having to manually repair the bad work with my 'delete' function. Now I've learned something again tonight thanks to both of you and I'm still enjoying more and more discovering ProcessWire Thanks again !
  11. Hello, I'm coming back to you since I've finally managed to extract the 'buggy' part of my code. Here's my problem : When a player loses a level, I want this player to lose all his equipment, so I wrote : foreach ($player->equipment as $equipment) { $equipment->delete(); } But here's what happens : The original equipment pages get deleted ! Not just the item in the AsmSelect ! And I just can't figure why this happens ! Yet I'm sure I am misunderstanding some basic principle here... So if anyone could give me a hint, I'd appreciate. To be more precise : my equipment list is in my tree in equipment/weapons/ and has many pages, such as sword, bow, gun... (It looks violent but it's not, it's a classroom experiment to motivate teenagers ) and my AsmSelect resides in a player template so whenever a player has the possibility, he can select an equipment page. Everything works fine, except when I use this 'delete' line In other words, how could I clean this asmSelect without actually deleting the pages in the original equipment tree? Thanks in advance !
  12. Just as a follow-up : I've noticed this happened just because of my 'Alt-Gr' keyboard latency. I explain : when I type ' || ' on my keyboard, I need the 'Alt-Gr' key and the second space character is then often hit with 'Alt-Gr' down making it a non-breaking space And VIM didn't show any difference. (but PHP did!) To finish : here's what I found that helped (in case it helps others) : https://wincent.com/blog/making-vim-highlight-suspicious-characters
  13. @arjen : Your code works fine. Thanks! I like the syntax very much and try and use it in the future. My entire code would be a little long to put here, I think and I'm not sure it would help. I can't imagine a ';' or a '}' is missing because everything worked fine before. My previous line was : $class = $page->name == "blog" ? "on" : ""; And i just tried : $class = $page->name == "blog" || $page->name == 'documentation' ? "on" : ""; and $class = ($page->name == "blog" || $page->name == 'documentation') ? "on" : ""; And in both cases I had the error. Then, I tried the longer version I mentionned a tfirst, and still the error occured. And I had to face the same issue (twice actually) a couple of days ago in another part of my code. I eventually found the workaround of copying the || from another place where it works, and as I said, just this manipulation of copying and pasting ' || ' makes the code work as expected. Which is why I wondered if there could have been an issue of character encoding that I would be absolutely unaware of, and this is why I decided on posting here And I'm again glad I did since you're teaching me a nice concise syntax that I should use (and that avoids my problem). So thanks a lot! But if you insist on seeing my code to try and understand the issue, I'll do it. If you have other ideas of where I should look from the info I've just added, tell me. I'd be happy to really understand this problem. @Fokke : Thanks for your quick comment (hence my editing of this post ) : I'm using VIM to code. And guess what : I've just tested your idea : getting rid of my spaces and re-typing them and....... YES! It works ! That's so cool! Now I'll try and understand why is my VIM acting this way and find a solution, but that's another matter. Anyway, a big THANKS to both of you ! This place is really one of the best place on the Internet, and I mean it. I have learned so much here and the community is so 'responsive' when you need help. That's really cool
  14. Hi there, Here's my problem which lets me... with a big ? in the head I have this simple piece of code : if ($page->name === 'blog' OR $page->name === 'documentation') { $class = 'on'; } else { $class = ''; } It triggers the error : Parse Error: syntax error, unexpected '$page' (T_VARIABLE) (line 114 of /home/celfred/PlanetAlert/site/templates/head.inc) This error message was shown because you are logged in as a Superuser. Error has been logged. If I get rid of the OR statement, it works fine. If I choose the right part of the OR statement alone, it works fine. If I type || instead of OR (what I did at first), it throws the error. And here's the best part : If I copy/paste the || from another IF statement that works fine in my site, it WORKS !! This is becoming a nightmare. I can't type a regular OR statement in my PHP code. I have to copy/paste the characters and it works. If anyone has a clue to help me on that, I would really appreciate because as I often say, being no professional coder, I kind of take A LOT of time on programming issues, but here, this weird behavior is over my head. I feel desperate when I stumble upon such basic parts of code Thanks in advance ! PS : I've tried to dig into my PHP config that would have changed since some kind of upgrade, but with no luck... I've looked at my file encoding (utf8)... Well, I'm stuck ! EDIT : Just to illustrate more : Copy/paste from another file that works : if ($page->name == 'blog' || $page->name == 'documentation') { If I retype the || operator and save and reload on my localhost : tada! Error !!!
  15. Hi there, I can't guarantee that this is an issue with pages2pdf, but let me point to my last Forum post : https://processwire.com/talk/topic/11065-urlsegment-issue-string-vs-integer/ Footer inclusion seems to mess things up. Maybe I'm missing something, though. If so, I'm sorry. (It sounds surprising that I would be the only one facing such a problem).
  16. Oh yes! The '6bc' 'bc' change is due to my numerous tests. I manually wrote 'bc' to avoid a number (another 'idea' of mine). It works fine now with '6bc' passed through the urlSegment2 value. I'll test further on with the footer option in pages2pdf and mention it to the module's creator if I see an issue there. Thanks a lot for your help.
  17. Here's where I am : - Updated to PW 2.6.1 -> The problem still happens. - I added the line you told me. Here's the result : #0 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Selectors.php(318): Selectors->create('bc', '', '') #1 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Selectors.php(115): Selectors->extractString('bc') #2 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Selectors.php(104): Selectors->setSelectorString('bc') #3 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Pages.php(203): Selectors->__construct('bc') #4 [internal function]: Pages->___find('bc', Array) #5 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(387): call_user_func_array(Array, Array) #6 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(325): Wire->runHooks('find', Array) #7 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Pages.php(310): Wire->__call('find', Array) #8 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Pages.php(310): Pages->find('bc', Array) #9 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Pages.php(325): Pages->findOne('bc') #10 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/templates/pages2pdf/_footer.php(11): Pages->get('bc') #11 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/TemplateFile.php(169): require('/data/web/d9/a9...') #12 [internal function]: TemplateFile->___render() #13 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(387): call_user_func_array(Array, Array) #14 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(325): Wire->runHooks('render', Array) #15 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/modules/Pages2Pdf/WirePDF.module(244): Wire->__call('render', Array) #16 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/modules/Pages2Pdf/WirePDF.module(244): TemplateFile->render() #17 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/modules/Pages2Pdf/WirePDF.module(182): WirePDF->getMarkup('markupFooter') #18 [internal function]: WirePDF->___initPDF() #19 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(387): call_user_func_array(Array, Array) #20 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(325): Wire->runHooks('initPDF', Array) #21 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/modules/Pages2Pdf/WirePDF.module(143): Wire->__call('initPDF', Array) #22 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/modules/Pages2Pdf/WirePDF.module(143): WirePDF->initPDF() #23 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/modules/Pages2Pdf/Pages2Pdf.module(497): WirePDF->save('/data/web/d9/a9...') #24 [internal function]: Pages2Pdf->___createPDF(Object(Page), NULL) #25 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(387): call_user_func_array(Array, Array) #26 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(325): Wire->runHooks('createPDF', Array) #27 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/modules/Pages2Pdf/Pages2Pdf.module(317): Wire->__call('createPDF', Array) #28 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/modules/Pages2Pdf/Pages2Pdf.module(317): Pages2Pdf->createPDF(Object(Page), NULL) #29 [internal function]: Pages2Pdf->___download(Object(Page)) #30 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(387): call_user_func_array(Array, Array) #31 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(325): Wire->runHooks('download', Array) #32 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/modules/Pages2Pdf/Pages2Pdf.module(99): Wire->__call('download', Array) #33 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/site/modules/Pages2Pdf/Pages2Pdf.module(99): Pages2Pdf->download(Object(Page)) #34 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Modules.php(464): Pages2Pdf->ready() #35 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Modules.php(553): Modules->readyModule(Object(Pages2Pdf)) #36 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/ProcessWire.php(315): Modules->triggerReady() #37 [internal function]: ProcessWire->___ready() #38 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(387): call_user_func_array(Array, Array) #39 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(325): Wire->runHooks('ready', Array) #40 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/ProcessWire.php(347): Wire->__call('ready', Array) #41 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/ProcessWire.php(291): ProcessWire->__call('ready', Array) #42 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/ProcessWire.php(291): ProcessWire->ready() #43 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/modules/Process/ProcessPageView.module(227): ProcessWire->setStatus(4) #44 [internal function]: ProcessPageView->___ready() #45 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(387): call_user_func_array(Array, Array) #46 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(325): Wire->runHooks('ready', Array) #47 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/modules/Process/ProcessPageView.module(152): Wire->__call('ready', Array) #48 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/modules/Process/ProcessPageView.module(152): ProcessPageView->ready() #49 [internal function]: ProcessPageView->___execute(true) #50 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(387): call_user_func_array(Array, Array) #51 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(325): Wire->runHooks('execute', Array) #52 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/index.php(241): Wire->__call('execute', Array) #53 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/index.php(241): ProcessPageView->execute(true) #54 {main} Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Selectors.php line 281) #0 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Selectors.php(318): Selectors->create('bc', '', '') #1 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Selectors.php(115): Selectors->extractString('bc') #2 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Selectors.php(104): Selectors->setSelectorString('bc') #3 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Pages.php(203): Selectors->__construct('bc') #4 [internal function]: Pages->___find('bc', Array) #5 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(387): call_user_func_array(Array, Array) #6 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(325): Wire->runHooks('find', Array) #7 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Pages.php(310): Wire->__call('find', Arra This error message was shown because you are logged in as a Superuser. Error has been logged. And here's my very limited analysis and what I managed to do and understand : - #10 is trying to get the page from my urlSegment2 string. I've noticed the call to the _footer page and remembered having the 'Print footer' option enabled in my pages2pdf module. I unchecked the option and.... tada! It works! My _footer.php page contains : <?php echo 'page générée le '.date("d/m/y \à h:i:s"); ?> So I figured out that maybe the problem would be in the pages2pdf module : shouldn't it call the Pages->get('name=urlSegment2') instead of Pages->get('urlSegment2')? Actually I may be totally wrong on that since much of this is way over my head, but I'm trying (hard, I promise ) to understand why this happened. Anyway, THANKS for your help since I can now make it work (loosing my footer is no big deal). An afterthought : I wondered why it worked on my localhost... I was using pages2pdf 1.1.1 (and 1.1.5 on the remote). Maybe an explanation?
  18. PW 2.5.3 and I've just ticked the 'Allow URL Segments' box. Settings are the defaults, I guess. (and no pagination) As I mentionned earlier, it works on my localhost. Maybe that could help, but I have no idea what to do with that... What is really weird is that I have other pages that work perfectly (with strings). The only difference I can notice is that here, I'm using 3 urlSegments. By the way, thanks a lot for your help.
  19. Actually, I thought as you say at first and struggled a couple of hours trying to isolate the code that triggers the error. I finally emptied my target page with just a : <?php echo 'test'; ?> But the error remained and it IS triggered by this call. As I mentionned in my first post, if I manually type '123' (or whatever number) in place of my urlSegment2, it works as expected. If I manually type '6bc' (or even 'bc') in my url, it throws the following error message : Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Selectors.php line 247) #0 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Selectors.php(284): Selectors->create('bc', '', '') #1 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Selectors.php(81): Selectors->extractString('bc') #2 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Pages.php(165): Selectors->__construct('bc') #3 [internal function]: Pages->___find('bc', Array) #4 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(389): call_user_func_array(Array, Array) #5 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Wire.php(344): Wire->runHooks('find', Array) #6 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Pages.php(260): Wire->__call('find', Array) #7 /data/web/d9/a9/72/planetalert.tuxfamily.org/htdocs/wire/core/Pages.php(260): Pages->find('bc', Array) #8 /data/web This error message was shown because you are logged in as a Superuser. Error has been logged. While writing this message, I've just tried manually entering '123' in the adress bar of the navigator, and it works right away, echoing my 'test' line in my PDF file... If I type a string (any character), it throws the error...
  20. Hello to the community, I'm facing a rather weird issue on my PW site with the pages2pdf module and urlSegments. Maybe one of you will help me figure this out. I have this code : // PDF Download link if (!$input->get['pages2pdf'] && $user->isSuperuser()) { echo '<a class="pdfLink btn btn-info" href="' . $page->url.$input->urlSegment1.'/'.$input->urlSegment2.'/'.$input->urlSegment3. '?sort='.$sort.'&pages2pdf=1">Get PDF</a>'; } My urlSegments are as follow : 1='all', 2='6bc', 3='12345'. In other words, I want to generate a PDF file listing 'all' events recorder for the team '6bc' during the time period id '12345'. It all works fine on my localhost site, but when I am online, I get an 'unknown selector' error instead of my PDF file. I have managed to find out that if I replace my urlSegment2 with an integer value, it works ! Why and how is this possible, I have absolutely no idea... I have other pages on my site where it all works fine with strings... I wonder, then, if I shoud go and replace all of my 'logic' : use query strings instead of urlSegments? Anyway, if anybody could give me a clue to solve this issue I would greatly appreciate Thanks in advance.
  21. Hi there, I'm still facing a little issue with the new updated version of this module. If I set NO limit when fetching data, I have an automatic limit set to 25, although my maximum amount in the configuration page is set to 50. If I set 'limit=0' in my request, it 'works', it fetches ALL data (event though I set my maximum amount to 5, for example). So it's not a big problem since I can manage my limit manually so it is consistent, but I wonder if that's the expected behavior... To me, the maximum amount should override any manually set limit, and if no limit is set, then the maximum should be the limit. I mention it since it caused me a little trouble on my site. Maybe someone will find this useful
  22. Thanks for your answers (and for the title update). I am definitely not at ease with the synchronizing between dev environment and live environment... I guess I'll try little by little following your advice and see how it goes
  23. Hi there, I'm trying to add multi-language support to my site. The site is already online and the database gets changed everyday. On my localhost dev, I looked at adding the multi-language support and noticed that it altered the database by adding new fields. Hence my newbie question : how shall I operate? I understand that I should keep modifying my database on my dev branch by adding the full multi-language support, but how will I eventually throw this online without loosing the new database updates happening in the meantime? For the moment, on my localhost, I've installed a fresh PW brand new version, I have imported my freshest database backup, I've changed many things (templates, modules, adapted some code so it works with my new PW version), and now I want to tackle this multi-language issue. But see, I haven't touched the database in my previous changes so far, so I wasn't too worried about throwing it all online again, but now, that's a different story to me So if you have a little time to point me towards the good direction, that'd be great! Thanks! Edit : SORRY for the forum admins, I've just noticed my wrong topic line : Upgrade an existing single language WEBSITE (not file) with multi-language new version. And I can't seem to have the possibility of editing it myself...
  24. Thanks for the help. Actually, after testing it didn't work. So here's what I did : I checked the $info['name'] content and it returned 'ProcessPageSearch', so I changed your line with if($info['name'] != 'ProcessPageSearch') throw new WirePermissionException($this->_('You do not have permission to execute this module') . ' - ' . $class); It works now! But maybe I've broken something doing this ?
  25. Hello all, Sorry to come back on this issue, but I have upgraded just about everything on my site and the only thing that prevents me from putting it online is this issue about being logged in as 'admin' to be able to use the ServicePages module I keep trying to understand, but I must admit this is (again...) way over my head, and I can't find a hack to this. If you're a 'guest', you just don't get to see anything on my site, which is a little dissatisfying As I said, I've tried the 'page-edit' to 'page-view' switch in ProcessPageSearch, but it didn't work and I can't firgue out what else to try. I've tried to understand the getModule call with the 'noPermissionCheck' option, but it's over my skills... So if anyone has a little time to help me, I would greatly appreciate! Thanks in advance.
×
×
  • Create New...