Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. @BernhardB - please try the latest version for me.
  2. Actually I am seeing @BernhardB's issue when running 2.7.2 - I'll hopefully have a fix soon.
  3. @BernhardB - are you using the latest version? Also, what version of PHP are you using - I wonder if there might be something connected with that? @Ipa - can you please try emptying the site/assets/cache/FileCompiler/site/templates folder and see if it starts working after that?
  4. What happens if you prepend a slash? $dotenv = new \Dotenv\Dotenv(__DIR__);
  5. $player->of(false); foreach($player->equipment as $equipment){ $u->equipment->remove($equipment); } $u->save("equipment"); EDIT: Ignore this and go with BitPoet's solution. I was just confirming that removeAll() worked, but he beat me to it
  6. @Ipa and @tpr - can you please try the latest version and see if that error is now gone? Speaking of the latest version, it includes a few new features. The ability to force superusers to always be in DEVELOPMENT mode, even on a live site. The ability to restrict non-superusers by their IP address - this is very useful if you need to debug a live site for a guest (or non-superuser role) and want the debugger bar and other features normally restricted to development mode. You can set the mode to DEVELOPMENT, give the user the "tracey-debugger" permission, and then restrict to your current IP address. The Users panel provides details of IP Address restriction so you can always easily check if you're safe.
  7. Does it stick around? or is it gone once you reload the page or something? Can you post the last line of one of your template files that is producing the error? Nevermind - sorry I see that @Ipa has already posted his.
  8. Do you mean that it needs to stay as is and separate from the newly proposed multiple checkbox fields that lists checkboxes for all the panels, or do you think that it actually needs to be a separate checkbox field for frontend and another separate one for backend? Sorry, i am not seeing why they need to be separate ones, but it's early here, so maybe just not awake? Nevermind, you just mean separate options within the one checkbox field, together with all the panels. Although I actually think it might still make sense to leave this as a separate field, because it is not related to panels - it's the entire Debug Bar. Hoped that sounds ok to you. I guess I could also set it up so that you could choose which panels appear on the frontend and which ones appear on the backend - make them separately configurable, although not sure if that would really be that useful?
  9. Hi @Ipa, Sorry about this. To populate the new "Variables" panel I am adding a line to the bottom of the compiled template files, but it includes a check to see if the class exists so I am not sure why you are getting that. Could you please post what that last line looks like for you?
  10. Very good point - are you meaning one field of multiple checkboxes, or a collapsible fieldset of with all the options as they currently are? I think the former would probably be quite nice, but it might be a pain for you guys when updating to a new version that has this because your current settings would be lost. I guess I could have some logic to convert the old separate checkboxes to the new multiple checkbox field, or maybe it doesn't really matter that much if you have to set them again? I'll have a think.
  11. From the default PW htaccess file: # ----------------------------------------------------------------------------------------------- # If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below. # ----------------------------------------------------------------------------------------------- # RewriteCond %{HTTPS} off # RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  12. Hi Tiffany - is this what you are looking for? foreach($page->tbl_CompanyURLs as $c_url) { if($c_url->url_company) echo "<a href='{$c_url->url_company}'>$c_url->url_company</a><br />"; if($c_url->url_updated) echo "<a href='{$c_url->url_updated}'>$c_url->url_updated</a><br />"; }
  13. No problem, I thought I should add that you can also do: $user->setAndSave('favs', $page_id); Simple as that! It's a relatively new method and I still forget about it myself. Read more about it here: https://processwire.com/blog/posts/processwire-2.6.9-core-updates-and-new-procache-version/#new-page-gt-setandsave-method
  14. Yep, so this is what you need: $user->of(false); $user->favs->add($page_id); $user->save("favs"); This of course assumes you are editing the currently logged in user. If not, then something like this: $u = $users->get($user_id); $u->of(false); $u->favs->add($page_id); $u->save("favs");
  15. Are you trying to add a new page to the list of available favs, or to select a page from favs (defined by $page_id) for the current user's favs field?
  16. Make sure you have debug mode on (or TracyDebugger installed) and let us know if there are any errors. I think it might be as simple as needing to add: $p->of(false); before you add the page.
  17. I don't think there is any way to make this happen at the moment. At least I haven't been able to find a FireLogger browser plugin for Firefox that works with the default developer console. But maybe someone will develop one in the future. Given that there is one for the Chrome dev console, you'd think there would be one for Firefox.
  18. The latest version adds a new experimental "Variables" panel (thanks to a request by @matjazp). This will show you the names and values of all non-ProcessWire variables available to the template of the current page - these are the variables you have defined in your template files and any "includes". It is disabled by default so you need to turn it on in the config settings. It is only available for PW 3.x and currently only works on compiled templates (although I am looking to get it working on PW 2 / non-compiled templates). It also only works after a template file has changed for the first time after this module is installed/updated. Please let me know if you have any problems with this feature - if you decide to enable it. This latest version also includes an enhanced PW panel - several additions/tweaks, but the most notable is the "Field Values" section which lists all Page fields and their values for the current page:
  19. Hey guys - I actually removed that popup link I was using - not because it didn't work great with RuntimeMarkup, but for other reasons - anyway, I don't have the code I used for it anymore. But, this works for me: $url = 'http://www.example.com'; $out = '<button data-href="'.$url.'" type="button" name="button" class="pw-modal pw-modal-large ui-button ui-widget ui-corner-all ui-state-default">'; $out .= '<span class="ui-button-text">Image Archive</span></button>'; return "<div class='pfabLink'>".$out."</div>";
  20. Thanks for that screenshot - that helps! What you are seeing there is because you have Force Scream mode enabled. I assumed you are getting the notice on the entire page blocking the site (like you get in Strict Mode). In reality I don't think you should have Force Scream enabled by default - its only purpose is to show notices/warnings that are suppressed by PHP's @ shutup operator. This can be useful when debugging your code in certain circumstances, but if you are using @ then you are intentionally silencing these errors. I don't think they are typically a good practice, but there can be times when they can be considered acceptable. Anyway, you can disable both Strict and Force Scream modes and you will still get notification of notices and warnings in Tracy. Try these in one of your template files to test: trigger_error("Warning TEST", E_USER_WARNING); trigger_error("Notice TEST", E_USER_NOTICE); With Strict mode ENABLED they will be a full screen error, that you can skip using the "skip error" when you hover over the "Warning Test": But with Strict mode DISABLED, it will be in the Debugger bar: Does that make sense and allow you to work how you want? PS Since I have that screenshot showing the "Skip Error" option, also note the "Search" option which links to a Google search of the issued error - a nice little shortcut
  21. @szabesz - sorry about that. I am guessing that you have the Force Scream mode checked? There is what I consider a bug in Tracy: https://forum.nette.org/en/25569-strict-and-scream-modes-together - I don't think that Force Scream should show warnings/notices from the Tracy core. Initially I modified the Tracy core to handle this better, but it turned out not to work in some server configs, so I went back to using the @ to suppress the session_start error. Anyway, I think if you save the config settings page for this module again it should get things working - I now prevent Strict and Force Scream modes from being abled at the same time. Please let me know if that works for you.
  22. Tracy Debugger (http://mods.pw/B8) - expandable call stack and variable dumping, error email notification, PW info/links, execution time, memory usage, and more!

  23. Ok, it's now live in the modules directory: http://modules.processwire.com/modules/tracy-debugger/ Thanks everyone for the feedback thus far, but please keep it coming - I am sure you will have suggestions on how it can be improved! I would also like to add additional 3rd party panels as requested, so take a look here (https://addons.nette.org/#toc-debug-bar-panels) for some possible things you may be interested in. Keep in mind, that link isn't properly scrolling down, so click on the "DebugBar panels" under Categories on the right.
  24. Latest version has two new features: Performance panel Shows memory usage and execution time between breakpoints. You add breakpoints using one of these: TD:addBreakpoint('Breakpoint Name'); addBreakpoint('Breakpoint Name'); bp('Breakpoint Name'); PW Logs viewer panel This shows the last 4 entries for the PW errors, exceptions, messages, warnings logs. This is just meant to give you a quick look at the last few entries without needing to go to the PW admin to the Setup>Logs section
  25. I think this might best be handled in your template as getting into having multiple formatted versions for each phone field in the module might get a little out of control. All you would need to do is build the number like this: $automaticDial = '+' . $page->phone->country . ' ' . ltrim($page->phone->area_code, "0") . $page->phone->number; Or something like that - I am sure you get the idea
×
×
  • Create New...