Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Pip

  1. Ty will check it out. I copied the previous htaccess. Dunno really what's up with this. Sigh.
  2. Thanks for the input. It occurs when I go to the website http://localhost/folder/ It's the parent for both the admin and site.
  3. I didn't do installation today. I transferred the files.
  4. Hi guys, Background: I was developing a website. I had some blue screen issues due to a video card issue and decided to format. Prior to formatting, I backed up the SQL script, and files and proceeded. Today: I restored the database (same name). Copied the files into a new folder in the XAMPP htdocs. When I kick in the Apache and database, it says the site is 404. ?
  5. I misunderstood the documentation! Got it working now. Thanks a ton!
  6. Hi everyone! Prolly this is the most noobest question. But how do you work on date times in Processwire templates? I've been working on one that will check if it's the current day and not over a certain time. PHP wise it's easy. But on a Processwire template, it spits out as an error. $wholedatetime = DateTime("now", new DateTimeZone('Asia/Singapore') ); $currentdate = $wholedatetime->format('Y/m/d'); $currenttime = $wholedatetime->format('H'); echo $page->batchdate; if ($currentdate != $page->batchdate) { if ($currenttime < 23) { $formflag = 2; } } Help!
  7. It depends on how you use it. $ingredient is just a name.
  8. Found another work around and removed it! Couldn't delete the post. But admin if you're seeing this, please delete any proof of my noobness.
  9. Hi guys, Testing out to create a new page from HTML. First one sucked because I used "&" rather than "." to join strings. Now I'm stuck with a blank page which I can't edit or deleted. :( Literally when I mouse over, nothing comes up. Help! OCD brain not working. Thanks in advance!
  10. Pip

    Phantom field

    ..... now it's working. I think your response scared the bogey away, @elabx
  11. Pip

    Phantom field

    @elabx bet it got you excited. Don't think it's a typo. Especially if you do a print_r($batch); <?php // Check if today is in a batch $batches = $pages->find("template=batch, batchdatestart<=today, batchdateend>=today"); foreach ( $batches as $batch): print_r($batch); ?> And this is the output (now): Here's a screenshot of the template now (not touching it now I swear!!)
  12. Hi all. I think I am being punked. I created a template called "batch" where I have "slotstotal" which is integer/text to store the value. Oddly, I have entered a value in on a page using the batch template via the PW admin. But when I do a print_r, I got this. I thought the field is bugged so recreated it with a different field name. Now when I refresh the page, I still got the same screen. (I tried changing the page a bit and it does reflect but the print_r is still the same. ?
  13. Let me face palm for a sec. LOL It works. So I needed to foreach another time so weird. Thank you so much!
  14. Debug is now on. Thanks on the efficiency. Implemented it. As for print_r, I got these.
  15. Hi Everyone Need some help on page reference (PR) field type in repeaters. I've checked other threads and it seems straightforward by referring to the object name and down to "title", "name" etc. I tried it on my side and it seems "title" and "name" and "id" of the PR is blank. But if I refer to the object itself, the page ID is given no problem. Problem is when I try to query the page (ingredient template) using $pages->find, it returns none as well. I did strval none (yes was that annoyed). Some background: What I am trying to do: I am trying to create an online order form for a pizza place where menu rotates and comes in batches. In the order form (page), it will check if today is in any batch. If yes, it will display all items in the menu BUT provided they have the available ingredients (ingredient->quantity > 0). My problem: I can't query the page which is weird and I need to check if there's still some stocks. ? See codes below. <?php // Check if today is in a batch foreach ($pages->find("template=batch, batchdatestart<=today, batchdateend>=today") as $batch): ?> <br> Title: <?php echo $batch->name; ?><br> <?php // Print pizzas available today foreach ($batch->menu as $menuitem): echo $menuitem->title . "<br>&nbsp; &nbsp; &nbsp; Ingredient: <br>"; // Print ingredients of this pizza foreach ($menuitem->topping as $pizza): // The problematic line belo. // If $pizza->ingredient->title/name/id, none appears. // If $pizza->ingredient, page ID appears BUT if you use in the $pages->find, it returns none. echo $pizza->ingredient . "<br>"; endforeach; endforeach; ?> <?php endforeach; ?>
  16. Hi everyone, Is there a way to funnel data from a Google Sheet to a Processwire page? Thanks.
  17. Hi @MoritzLost Tried your recommendation. You're right the hero-ability.php was non existing. Recreated it and is now linking automatically! Thanks so much! Happy Holidays!
  18. Hi @MoritzLost Thanks for making the module. It's really handy for sites that have majorly a lot of pages. I'm working on a game site where there are heroes and their special abilities, items, etc. . Was totally delighted that it was working on my test environment but I noticed that (sorry if it feels snobbish but itemizing helps me think lol) hyperlinking only works on the Body textarea it only works on one page template so it seems I have two templates - hero and hero-ability. They're both in the module settings. I've also counter checked that my textarea fields have the same settings as the Body textarea. Did I do something wrong? Or did I misunderstand something? Thanks.
  19. Is there a way to import pages with the parent in the CSV?
  20. PS: Import goes in still btw. Whether if it's correct or not, I have to double check as I've added in hundreds. ?
  21. Hi everyone! Was wondering if anyone been getting this error when you import? Been scratching my head on this. Checked 515 and this is what I got. if($page->id && count($page->get('ImportPagesCSVData'))) { Any idea what's tripping it?
  22. So apparently after going through stuff the reason as to why the email address never changed is due to the XAMPP settings. Despite setting the settings that way, it overwrites the sender still. Oh wells. Silly me calling it sorcery. ?
  23. Redid the whole thing. It works now.Thanks!
  24. Hi guys Just want to confirm something before I go calling the ghost busters or something. So here's aroughsummary.: I'm currently working on a Xampp environment. Each site I work on, I customize the domain from localhost -> confabulations. No .com, .net, .org, etc. I've installed processwire and it automatically sets this in the config: $config->httpHosts = array('confabulations'); Everything works well in Login/Register until one day, I get this error when I register on the site (locally). Which is weird because I have not been customizing the module itself. Not until I change this: $config->httpHosts = array('confabulations.com'); Then it works. I mean sure fine theoretically if I change my vhost etc to confabulations.com it should work. But what I do not understand why suddenly trigger such error when the only modules I have is the Sitemap and Login/Register/Profile. ?
  • Create New...