Jump to content

Gazley

Members
  • Posts

    526
  • Joined

  • Last visited

Everything posted by Gazley

  1. So, two VirtualHost files specifying docroots matching the above paths, with wire/site/index.php in each folder. Cool! Thanks apeisa
  2. Hi SiNNuT, Thanks for chiming in. Well, this was really the nub of the question. If I did include ProcessWire in the docroot, then in the VirtualHost setting for the site, I would have set the DocumentRoot value to something like "/var/www/htdocs/ProcessWire". In this case, I assume that would work. Other than that, "/var/www/htdocs/" would contain only "site", "wire" and ".htaccess" as you suggest. I guess that by keeping "site", "wire" and ".htaccess" in a site-specific subdirectory off of the docroot, I could potentially have more than one PW site hosted by my dedicated server. Does all this sound about right to you? Cheers!
  3. Thanks a lot Ryan. I just wanted to make sure that the folder name doesn't appear in the final URL. BTW, I'm having a total blast with PW! Lovin' it
  4. Hi there, Yep, this is a pretty dumb@$$ed question but I'll ask it anyway In the CP, my very top level is "Home". Against localhost, my browser URL shows: http://localhost:8888/ProcessWire/ When the site goes live, in this case, I want it to show something like: http://my-funky-new-site.co.uk/ Assuming I specify that the VirtualHost DocumentRoot value includes the "ProcessWire" folder (or whatever comparable folder it is on the server), will PW automatically handle/show the URL like: http://my-funky-new-site.co.uk/ Thanks!
  5. I said can "someone" explain - the debugger doesn't qualify! Keep 'em coming - there's a lot of mileage left in the debugger wise-cracks
  6. @teppo & @soma - thank you both! This is exactly what I was looking for. I thought $repeater->images[0] (using an indexer in the images collection) would give me what I wanted but instead, it gives a Page type which doesn't make too much sense to me although doubtless, there will be a good reason for it doing so! This is so awesome! Thanks for the brilliant replies --Gary
  7. Hi there, Wonder whether someone can explain something I'm seeing. I started out with an image field type - no repeater. I could access an individual image object reference, point to it's "url" property and I had a path to the image. When the image field is in the repeater, I see the following value: $repeater->images->url = /ProcessWire/site/assets/files/1009/ When I look in this folder, I see the image that I want, and also, another image that in this case is called "gina-bg-2.0x100.jpg" - the one I actually added was "gina-bg-2.jpg". So, firstly, I don't know where the x100 version of the image has come from? Secondly, I want to get the full url path to gina-bg-2.jpg but I cannot seem to see a way of directly referencing it now the image is inside the repeater? $repeater->images is a "Pageimages" type reference. How can I access each contained Pageimage? If I specify $image->images[0], I get a "Page" type and not the Pageimage that I expect. Any ideas appreciated! Thanks --Gary
  8. Ah, thanks guys! I didn't really understand what WillyC was getting at. I thought he was suggesting some PW internal configuration and that was right over my head It's working absolutely great now - I thought that on my very first repeater and very first save, I must have done something really wrong for it to pop so quickly. This is a great forum! Cheers --Gary
  9. This hasn't anything to do with XDebug but I disabled it anyway and same result. I don't understand what you mean by ++nesting level ? Thanks.
  10. Wow. The very first time I saved my very first repeater entry and boom! Error Maximum function nesting level of '100' reached, aborting! (line 95 of /Applications/MAMP/htdocs/ProcessWire/wire/core/Data.php) The repeater structure contains an image field and additional two text fields. I also cannot get back into the page. I get the same error message. Any ideas? Thanks.
  11. If anyone's interested, I've attached a screenshot of the debugging environment. PW_debug.tiff
  12. Hi there, In the home page (and indeed elsewhere) of the first site I'm building, there are a range of images. Some of the images are dedicated to a carousel, others are for different places in the home page. I could obviously add all of the images to the "images" field. The image field type provdes Label and Description values. However, I will want to query all of images that should be used in the carousel to write out in a loop. So, this is an additional "property" to group by. I might also want to order the images in the carousel group by an integer so they appear in the correct or user-defined sequence. This is therefore another additional property. I suppose I could create a second field based on image fieldtype called "carousel" and then I know it contains only the carousel images. However, I still want to have the ability for the end user to specify an order in the control panel. Clearly, this could be achieved using a single image field where the images have a naming convention. However, this would be very brittle from the end user's POV. The question boils down to best practice in this scenario? I could see this being a "repeater" use-case where the extra properties are part of the repeater item. Before I do this, I wonder whether anyone could advise if this sounds like a good approach or, is there something I'm missing, like somehow extending the image module to include these values as I can see this being a requirement time and again. Thanks! --Gary
  13. @slkwrm - I'm referring to the template file in the templates folder @soma - nice debugger crack; I know I'm going to regret starting the whole debugger thing @ryan - Caching would appear to be the logical reason so thanks for the confirmation that this indeed does happen. Cheers! --Gary
  14. Hi, Can anyone confirm whether templates are routinely loaded "up-front"? I'm playing around with the basic website provided with the standard PW installation. I've replaced the home page with my own that doesn't reference the "basic-page" template. Even though my home page loads first, I'm seeing "basic-page" being instantiated in the background on numerous occasions. If I alter its name to "_basic-page", the behaviour stops. This isn't a problem or anything like that - I'm just keen to understand what PW is doing. Thanks --Gary
  15. Hi Pete - I used another PHP framework for circa 3yrs+ and the first two years, I never used a debugger because of conflicts with its encrypted source. So, I had to revert to the standard approaches used "back in the day". I think it's down to personal preference and that's fair enough. --Gary
  16. Hi Nik, I've successfully used PHPStorm and XDebug for quite some time. Before that, I used NetBeans and XDebug but there were issues between the latter pairing that eventually saw me move to PHPStorm after a year or so with PhpED and its own native debugger! There is no real magic to the setup other than initially, I was coding against PW on an Ubuntu 12.04 server installation, in a VirtualBox, on my iMac. I used ExpanDrive on the Mac so PHPStorm just saw the Ubuntu server as another volume on the Mac. This worked fine until I decided to start debugging and I just couldn't get this to work at all. Basically, PHPStorm + XDebug don't really like to debug against a "remote" server when the source code isn't in a "local" installation. So, as I was talking to Ubuntu in a virtual server, albeit local to my Mac, it was still "remote". So, I installed MAMP on my Mac and setup PW in its htdocs folder. As far as PHPStorm + XDebug is concerned, it's "local". However, this still didn't work without error. I was stepping through the code and occasionally, it would just time out. This was using PHP 5.4.4 and XDebug V2.2.0, the latter known to be "buggy". In this case, maybe there was issues with PW running in PHP 5.4.4 or maybe it was XDebug. To test, I backed of PHP back to the latest 5.2 release and an appropriate XDebug version. This works like a charm. It's too much hassle trying to build XDebug from source to its latest 2.2.1 release on my Mac. This would be easy in Linux but for various reasons, on the Mac, it's a real pain. When MAMP releases another version, it will likely have the XDebug 2.2.1 or later. At that time, I'll re-install it and see whether PW + debugging works with PHP 5.4.4 or later. I was amazed that debugging seemed so alien to PW users. I really hate coding and hoping for the best so give me the ability to debug every time because when there's a problem, there's nothing easier than sticking a break-point in the code and seeing exactly what is going on. To be fair, in my day job, I use the MS stack (C#) so I use Visual Studio and that has always had great debugging/tooling. As you can imagine, I expect this to be available to me in PHP or Ruby too. I hope this explanation helps. --Gary
  17. I know that some of you wondered what the hell I was tring to achieve with this After a lot of messing around, full debugging via XDebug works and I am now able to put break-points anyware in ProcessWire and even step into and through the templates and their nested PHP, when the site runs. This means I can check variables, miscellaneous output as it is being written into the HTML, check program flow and step into and through the framework/CMS code. Cool!
  18. Hey there, just a quick heads-up, I'm now displaying my Bootstrap enabled page(s) thanks to your advice! Regards --Gary
  19. @adamkiss No problem. I'm not really "struggling" with PW, I'm trying to see whether I can get it to fit into the workflow that I'm used to. If by spending some upfront time I'm able to do that, I'll be massively more productive going forward. If not, I'll just do things the PW way.
  20. Hi Soma, I'm pretty used to a live debugging environment in PHP. As far as debugging goes with PW, I would just like to be able to set a breakpoint in a template and be able to test the values being injected into the output. This is a fairly standard approach for me. The PW context is there when the code is being executed so, this isn't a design time requirement. Thanks.
  21. >I must say you seem to struggle with PW the most I've seen yet That's comforting to know.
  22. Hi there, The title just about says it all! I wondered whether anyone has been able to achieve this? I've been trying all day to configure PHPStorm but no luck far Thanks --Gary
  23. That's great advice! Cheers Dave.
  24. Thanks Dave - that's why I couldn't find it!
×
×
  • Create New...