Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. You are mixing PHP and HTML incorrectly. Close PHP with ?> at the end of the first line - that way it won't throw the error on the opening <div on the second line.
  2. @benbyf - not sure whether you mean real content, or dummy/placeholder, but if the latter, then maybe you want to check out:
  3. Thanks again @sodesign - I have added that on that line, and also a few others. Please test the latest version.
  4. If you do try Dynamic Roles, please check out this: https://github.com/ryancramerdesign/DynamicRoles/issues/14 It's a super easy fix, but I don't really understand why no-one else seems to have noticed this - maybe it's just me somehow
  5. No worries - thanks for reporting and helping to debug. I have committed a new version with this fix.
  6. Thanks @sodesign - looks like you are using a Page Reference field that only accepts a single value, under Details > Page field value type - is that correct? I think I must not have properly tested with Single. Can you please try replacing: if(!$pageMatch->id && $title!='') { with: if(!$pageMatch->id && $childFieldValue!='') { here: https://github.com/adrianbj/BatchChildEditor/blob/f3a77b5338fd69b14b939edbae9948f42af2fc14/BatchChildEditor.module#L1675 Please let me know if that works.
  7. Hi @sodesign - thanks for looking into a solution for this issue. Are you using the latest version? It just seems like the location where you are adding that (after line 1674) is probably too late to be useful in the latest version. It would definitely be great if you could provide the error you are getting, and what line it's on, as well as the title that is not being successfully matched. Also, based on where you are adding that line it looks like it's matching of a page reference field title that's the issue - is that correct?
  8. This is for content, rather than templates/themes, but here it is: https://github.com/nicoknoll/MigratorWordpress
  9. Glad you got it sorted. Just an FYI:
  10. Have you tried the Page::localPath hook which is actually the name of the version in the LanguageSupportPageNames.module file.
  11. You might want to remove that NatGeo India site - unfortunately it is now on WP
  12. Yeah, I think this belongs in @pwuser1's other thread about IDE autocompleting in general. While you might find one editor better for jquery code completion and a different one that's better for php code completion, are you really going to switch editors depending on what you are working on? Just find a good editor and download a plugin for jquery code completion - all the big ones will have one.
  13. I wish Wasn't me, but it's great having an official government site on PW.
  14. Just do this: $pages->find("template=files, include=hidden");
  15. Maybe I am incorrect, but it seems like you are trying to WP'ize PW. I think that it makes more sense to educate the client that in PW the page tree is hierarchical and this makes much more sense than having Posts and Pages listed at the same level, with Home below Pages. Maybe if you need Posts, Categories, Media, etc to stand out you could make use of icons in front of those parent pages? It might give the visual cues that the client needs to find these easily amongst the other top level pages?
  16. Personally I wouldn't bother with PWCron - I would use a normal system cron (via crontab -e or similar). This is the simplest and most customizable approach.
  17. Unfortunately it depends on the load order of the modules. If Tracy is loaded before the module you are trying to debug, then yes it will work. I use it regularly for debugging when developing modules. Unfortunately, the order that modules are loaded seems to be pretty random (although I haven't looked into this properly). I have put in a request to Ryan to add a way for Tracy to be loaded earlier, but I haven't heard anything on that. I'll keep it mind to see if there is a solution I can come up with to get it loaded earlier though - it might be possible to include the required files manually in the root index.php or something like that, but it could get messy.
  18. Can you do a Modules > Refresh ? http://pwtest.test/processwire/module/?reset=1 The error is coming from the ProcessField.module file - it looks like it is trying to send a field to a template so I think there must be something cached there that needs to be cleared.
  19. Thanks Robin, Please check your PM - a have a major new version in the works (probably released tomorrow) which already fixes this along with Rick's issues. I have sent you a preview to test.
  20. There are other ways, but check out the Request Info panel in Tracy when viewing the field settings in the admin. See that there is an "initValue" setting. This indicates that you can do: $fields->get("map_width")->initValue In the Tracy Console panel (again if you are viewing the field in the admin), you can do: This is because the Console makes available $field, $template, and $module when you're in the admin and viewing an individual field, template, or module.
  21. This is what I use when using the ProcessPageEdit::processInput hook. Put these as the first lines inside the function. // ProcessPageEdit's processInput function may go recursive, so we want to skip // the instances where it does that by checking the second argument named "level" $level = $event->arguments(1); if($level > 0) return;
  22. I don't understand this. It should look like this. Can you please confirm you are using like this, and include a screenshot showing where the output appears? Just to check, what browser are you using? Just implementing now - will appear in the next version. The console panel does have issues - I have a new version I am testing here (to be released shortly) that fixes this. I don't understand why the Dumps panels would not be stopping at the viewport though, but I would like to sort it out if it's happening for you - again maybe we have a browser issue here - what browser/version are you running? Yes - let's take to PM now - I do want to figure out why you are having these issues. I am going offline for the rest of the day now - so we can pick this up later!
  23. I think this might be a worthwhile addition. Interestingly, the default behavior for the ajax dumps panel in the Tracy core is actually to clear previous results on each ajax call. I am overriding this because this means you miss consecutive ajax calls (if they happen without user interaction). Yes, currently this is true, but I am thinking of adding the Clear Dumps button for you so this won't be necessary. It should automatically increase in height as more items are added to it. Once it hits the height of the viewport, the contents become scrollable. If you call d() from a template or other file, yes this is the case, but if you call it from the Console Panel (which is what I thought you were talking about), the output appears below the code in the Console panel - much nicer
  24. Sorry Rick, I got confused between the Clear Dumps button and the older "Preserve Dumps" checkbox - my bad! Back to your issue. I am not sure I fully understand the need. I would suggest leaving the Dumps Recorder disabled unless you really need it for something. The Dumps (ajax) panel is designed to append new bd() calls so you don't miss any. As soon as you reload the page (or navigate to another page), they should be automatically cleared. I am still a little confused by this - are you trying to prevent the items from the ajax panel ending up in the Dumps Recorder panel? I could potentially add that Clear Dumps button if you really need it, but I would like to know if you are using the Dumps Recorder always - just trying to understand the use case so I can come up with the best solution for you. On a side note, I almost always use d() calls when using the Console panel. I assume you know about this, but just in case you don't, it is usually a nicer experience.
  25. It sounds like you are running an older version of Tracy - the Dumps Recorder hasn't had a "Clear Dumps" option for a while now. Please try the latest version and see if the current behavior works for you. I rarely use the Dumps Recorder anymore - it's really only relevant if you need to compare successive page loads, or you have a bd() in an unusual location that that main Dumps panel (and the ajax and redirect versions) can't pickup - this usually only happens in module or PW core debugging.
×
×
  • Create New...