Jump to content

adrian

PW-Moderators
  • Posts

    11,213
  • Joined

  • Last visited

  • Days Won

    373

Everything posted by adrian

  1. Hey @bernhard - I took another look at the $wire variable not being available in ready.php (and init.php / finished.php) and this has been fixed in the latest version. Please confirm it all works at your end please.
  2. Hi @bernhard - that $wire issue is interesting. I will take a look soon. As far as the memory limit issue with Captain Hook - I reduced my memory down to 64MB and it still worked. I had to go to 32MB to get the error so I am wondering what file caused the error on your system. Could you please debug the path of $file in this function: https://github.com/adrianbj/TracyDebugger/blob/8b92a7d6aec5d9999a77f591496fe8b3ed32080b/panels/CaptainHook/CaptainHookSearch.php#L44 Hopefully that last one to be output should be the file that is causing the limit to be reached. That will at least give me an idea of what is going on. I could of course just set a higher memory limit for this panel, but would like to see what is causing it to fail first. Thanks!
  3. The modules manager module hasn't been tagged as PW 3 compatible. I honestly don't really think it is necessary these days - we have such an easy way of installing modules directly in PW by their class name.
  4. What type of field is "group" ? There doesn't appear to be anything wrong with your original selector, but I am wondering if maybe it's a Page Reference or Options field type. It would be great to see exactly what the SQL query is (the one coming from that selector). Do you have TracyDebugger installed? If so, take a look at the PDO queries section of the debug mode panel and see if you can find the query for us please.
  5. That fatal error is an interesting one and suggests a possible bug in ProcessWire. You should not have to (and probably shouldn't) disable that mysql setting. I would like to know what selector in your template (that calls the PageFinder) is resulting in that error. Is it possible for you to narrow that error down to a specific $pages->find selector?
  6. I am not sure why you disabled the file compiler. If you leave that turned on you shouldn't even need to add the namespace to the top of the module files. Was there a reason you chose to disable it?
  7. @hellomoto Can you please check your phpinfo (via Tracy if you have it) and let me know if tokenizer is enabled.
  8. Yes you can, but generally there is no need to have more than one unless they are on the same template. You can use template context overrides - click on a field name in the template view (showing all fields) and set the label and other details there and these will only be for that template.
  9. The label is what the user sees when they are editing the page in the admin, so it's very useful. You can rename the field from "images" to "myphoto", but you need to change the name of the field, not the label.
  10. Your field name is "images" - it's the label that you've set to "myphoto". Just replace the call to "myphoto" with "images" and you should be fine!
  11. Yeah, those should all work just fine. If they're not, then something must be odd with your settings somewhere. Is this online somewhere I could take a look?
  12. Very late response to this, but I would like to follow up on this. I specifically testing BCE with importing CSV to the MapMarker module and it worked fine (if you set up the CSV field pairings correctly. It should also work with the Leaflet map as well. If you have time, it would be great to hear how you set these up in case there is actually a problem still.
  13. I have had random failures on an old shared host that I no longer use. I never got around to debugging, but I wondering if it's a curl issue. I'd be curious if you have better luck disabling curl here: https://github.com/processwire/processwire/blob/57b297fd1d828961b20ef29782012f75957d6886/wire/core/WireHttp.php#L639 Just remove 'curl' from the $allowMethods array. It should resort to fopen and socket consecutively if curl fails completely, but maybe there is some curl setting on that host that is randomly problematic with Github. Not sure, but maybe worth a try.
  14. @tpr's awesome Admin On Steroids (http://modules.processwire.com/modules/admin-on-steroids/)
  15. There is slight mistake in what @PWaddict wrote - you still need to access that "first" image in the array I would also advise using more meaningful variable names, eg use $repeater_item rather than $image in the loop, because it's not actually the image that you are getting, but rather the repeater item that has title, body, and image field in it. foreach($page->your_repeater_field as $repeater_item) { echo "<img src='$repeater_item->your_image_field->first->url'>"; } The other option is this if you want to output all images from your image field. foreach($page->your_repeater_field as $repeater_item) { foreach($repeater_item->your_image_field as $image) { echo "<img src='$image->url'>"; } }
  16. Repeaters are another one of those fields that returns an array so you need to foreach through each of the repeater items, then grab the images from that repeater item. On mobile so no code example but hope that makes sense.
  17. Unless set to "1", image fields return an array (as do File fields, and many others). You have to either foreach through all images, all call a specific one. You can do: first(), last(), or eq(n). Read more about it here: https://processwire.com/api/fieldtypes/images/
  18. For a little more info on what I found which will hopefully help others: There were lots of JS errors in the browser developer tools Console tab like this: Uncaught SyntaxError: Unexpected token < which is a good indication that there is an error message, or at least some HTML being returned in the AJAX request which is not expected by the JS script. So then I went to the Network tab of the developer tools and found the script that is uploading images (?id=1&InputfieldFileAjax=1), and checked the response - that is where I found this login form: Also. of course, when I saved the page, it asked me to login again, so that was also a hint. @Roberts R mentioned that he didn't get the console errors - turns out he didn't have "Disable Cache" checked on the Network tab and apparently that made a difference. I always have it checked because Chrome caching drives me crazy but this might be a helpful hint for others.
  19. Yeah, hooks are very cool and not as scary as they may first appear. Be sure to check out the Captain Hook panel in Tracy - it gives you a list of available hooks for each file/class/module in ProcessWire. It can take a little time to figure out what you should be looking for, but once you do, the skies the limit!
  20. Yes, you will need to create it. Basically any code in that file will be run when ProcessWire is "ready". You can read more about it here: https://processwire.com/blog/posts/processwire-2.6.7-core-updates-and-more/#new-core-files-for-site-hooks
  21. Sorry for the delay - I got sidetracked. You can fix this easily with a little hook magic. Place this in your /site/ready.php file: $this->addHookAfter("InputfieldRepeater::renderRepeaterLabel", function($event) { $return = $event->return; $event->return = str_replace('#', '', $return); });
  22. Sorry, ignore the stupidity in my last post - I did #1 instead of #n I'll look into it and get back to you in a minute
  23. It works for me. Is that what you are looking for?
  24. Have you checked the console's Network tab - of course make sure this is open before you upload the images, and start by clearing any existing items to make it easier to see - sorry if this is obvious to you already. Do you have PW's debug mode turned on? Also, installing Tracy Debugger might show some otherwise missed errors.
  25. Is it always 2 images that work? Do you maybe have Max files set to 2 for the image field? eg:
×
×
  • Create New...