Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/08/2022 in all areas

  1. @Flashmaster82 use TracyDebugger and check your variables where ever you want by doing <?php bd($test); // variable or object you want to test ?> See example screenshot:
    2 points
  2. If you echo $item->option a string will be echoed and you can't calculate with a string. In order to do the math you have to echo $item->option->value to get the value of the selected field which is in your case an integer. To be precise you could do $w1=intval($item->colwidth->value); See: https://www.php.net/manual/de/function.intval.php
    2 points
  3. So I ran into a strange error this morning when trying to publish a page. I went to publish a new page under "clients", but I get an error that says "Cannot be published until errors are corrected". I thought perhaps I had missed a required field so I checked, but none of the fields are marked as required. I then checked to see if I could just add a basic page (default basic-page.php template) under the homepage, but I get the exact same error when trying to publish. When looking at the template, I don't see any error messages being displayed above any fields. The odd thing I found though was if I got to "settings" and uncheck "unpublished", I can then publish the page without errors. I did upgrade earlier today to the newest version to hopefully fix an issue I had yesterday (which it did). Has anyone run into this error before? **EDIT** Well, after a lot of staring and pulling my hair out, I found the issues. I had installed multi-language support sometime ago (and due to the project changing, had to remove it). Apparently in my haste, I did not remove all the dependencies so it was still trying to check for the multi-language title (I am guessing) even though it actually wasnt on the page. I went through the database and removed it and can now save/publish pages without issues.
    1 point
  4. Please look in your ddev config.yml file, if apache-fmp is defined under webserver_type
    1 point
  5. Sorry, I somehow overlooked this line. You can’t compare $page->template to this string because it is not a valid template name. The line will always return because the condition can never be true. I think you probably want this: if (!$page->matches("template=auction-bid, auction_bid_date>={$parentdateminusstart}, auction_bid_date<={$parentdateminusend}")) return; //only continue if the added bid’s auction_bid_date is less than 3 minutes before the parent’s auction_end_date. See https://processwire.com/api/ref/page/matches/.
    1 point
  6. Now do bd($page->parent->auction_end_date) from inside the hook
    1 point
  7. Just do it the same way, here i did bd($page) on line 31 in ready.php
    1 point
  8. @Flashmaster82 what is the issue ?
    1 point
  9. To me this looks like a redirect issue. Thing is, that $_FILES gets cleared when POST requests are redirected. You can check for redirects in your browser dev tool's network tab when you submit the form. If you use the exact same form for both submissions (company and employee), you need to check what is different when you submit the form. Is the form action URL for both exactly the same? Do you have any code in place that redirects the form submission to a different URL when using it for employee?
    1 point
  10. I'd go with FieldtypeOptions. Let's say your field is called "colwidth" and your options are: 1=1 2=2 3=3 Then you could do something like <?php $w1 = $page->colwidth; $w2 = 4 - $w1; ?> <div uk-grid> <div class='uk-width-<?= $w1 ?>-4@m uk-width-1-1@s'> <figure> <img src='{$page->image->url}' alt=''> </figure> </div> <div class='uk-width-<?= $w2 ?>-4@m uk-width-1-1@s'> $page->body </div> </div>
    1 point
  11. How can I customise the three Quick Toolbars? The new line context bar has two buttons - Image and Table. However, I don't want the table and the image button just opens up my local file system rather than the normal pwimage dialogue. I also want to add a couple of extra buttons on there ideally like embed or heading etc.
    1 point
  12. I've had a conversion with @3fingers over the last few days regarding that topic. I contacted him via PM because I am planning something similar and I did not want to give the impression that I was torpedoing his plan (or that he spends much time that in the end does not pay off because there is a similar free course by someone else). To be more specific, what I have had in my mind for quite some time now is to make a ProcessWire version of this video: ProcessWire from Scratch 2022 | Laravel Alternative? (on processwire.rocks) I thought that might be a good idea for several reasons: While watching that video to get an impression of laravel I thought so many times: "That would be so much easier in PW", so I wanted to show that to others I thought such a video could maybe catch brad's attention and he might be willing to share the video across his audience or even try PW and make a video about it himself I thought it's a good starter project with a good structure that shows a lot of the most important concepts and it would be nice to have a side-by-side comparison @3fingers asked me to post this publicly to get some feedback from the community so that we can then decide how we should proceed so that everybody benefits from it.
    1 point
  13. I'm going to relate this to PW, promise. I'm looking for a cool, simple, free helpdesk system. Nothing too fancy, just letting users in, post a ticket, get replies, talk back, close ticket, reopen ticket, close again. See a list of what was requested, what's open, what's done. Anyone got suggestions? I can only find paid or crap solutions. No middle ground. Now the link to PW: As a way to promote PW, would it be a good idea if we had projects, like a ticket system, free and based on PW? You'll all probably agree it would be relatively easy to pull off a ticket system in PW. I'm imagining something styled by the theme system (I love Reno), using an installation profile to setup, the roles system that's already there, and sold as "the free, processwire powered helpdesk system". Devs need ticket systems and like me want to avoid spending a dime. They find this and try it out. It's cool. Let's have a look at PW since we're here. Whoa this is awesome! And my clients will see the same beautiful, tidy interface on their CMS? Screw you WP, I'm going PW from now on! Does this sound like a good idea or am I just trippin?
    1 point
  14. PW ticket system or simple project / task management would be nice...
    1 point
  15. Is the line that throws the warning within the function you just showed?! Clearly the variable is defined right here: $pageparentdate = $page->parent->auction_end_date; I’m not seeing the problem right now, sorry!
    0 points
×
×
  • Create New...