Jump to content

ryan

Administrators
  • Posts

    17,231
  • Joined

  • Days Won

    1,699

Everything posted by ryan

  1. You can also detect if a hook is coming from an admin save by checking the value of wire('process') in your $pages->save() hook: <?php $process = wire('process'); if($process && $process->className() == 'ProcessPageEdit') { // this is an admin save }
  2. Take a look in /site/config.php. A few lines down you'll see this line: <?php /** * sessionExpireSeconds: how many seconds of inactivity before session expires * */ $config->sessionExpireSeconds = 86400; Change that to adjust how long you want sessions to last.
  3. I'm not quite sure I'd want to delegate all my file management over to Git. That seems like a major sacrifice relative to having SSH, but maybe I'm just not used to the idea yet. I'll have to try it at some point before I judge it. But you are right that the provided resources just don't seem to be a good enough of a deal to motivate one to try something new. I need to check out the Storm on Demand that you mentioned, that sounds interesting. Their 2GB plan looks nice and sounds like a better deal than the VPS I've got now. Though I can't determine if it's fully managed (they list 3 tiers of management, but don't say what applies) and I can't tell of it comes with cPanel?
  4. Slkwrm, thanks for your kind words, glad you are enjoying ProcessWire. With regard to flexibility, I would just say that I prefer to let the project dictate the best way for things to go together rather than the platform. I think that comes from being a bit old school about design/development and not wanting CMSs interrupting the design/development workflow. I've written a few CMSs already over the last 10 years, several custom platforms and a couple previous products (Dictator and ProcessWire 1), so I guess I've had plenty of time to make mistakes, learn from them, and hopefully ProcessWire benefits from that. But don't give me too much credit, because it's mostly just trial and error, and time. Give credit to yourself and the community here– ProcessWire is far better as a result of the community. Everyone here is helping to make it a much better and more flexible product than I ever could have on my own.
  5. This looks very interesting, and I like the sound of anything that would let us be able to scale to handling high traffic out of the blue. But I'm completely lost once I get to either site–I'm going there looking for hosting, but they are just talking about developing applications and using Git. Even after reading and watching the videos, I'm not clear about what exactly these services are – I must be having a dumb moment today. I found something I could relate to on the pricing page but it's all pointing to really expensive shared hosting. Has anyone used these are knows what they are? Do you get SSH and root access? I see lots of talk about scalability, but relatively limited resources called out on the pricing page. What advantages and disadvantages does this have over having your own dedicated server or VPS?
  6. That's good to hear, I wasn't aware of that. I just remember using C5 and seeing scalability concerns and client support nightmares all over the place. But that was awhile ago. Based on how they are growing, I think their business model is one we can learn from, especially with regard to the marketplace they have there.
  7. That's correct. The 'modified' field is meant as a system field and nothing else in the API has access to change it (or prevent changes to it). I'm thinking I can provide an override for cases where we are just saving a field ($pages->saveField($page, 'field') or $page->save('field')) as opposed to the whole page. I can set it so that if $page->modified < 0, then it'll ignore it when doing the save, leaving the existing modified time in place. Then a module like the Comments module could feasibly tell the $page not to update it's modified date.
  8. Thanks for this info and link–that's a great reference. It looks like the language codes generally line up with the codes we're recommending people use for their language names (at least for the first 2 characters), but I don't think we can count on that. I think what we'll do is have this module's installer add a field to the 'language' template (when present) that lets one specify the Google Maps language code for each language. Then this module can just get the language code from $user->language->gmap_lang; or something like that.
  9. This has been added in the latest commit of the 'dev' branch (for 2.2). You'll see the Field duplicate/clone option under the 'advanced' menu when editing a field. From there, you just check the box asking you if you want to clone the field and click save. You can also access it from the API like this: <?php $field = $fields->get('title'); $clone = $fields->clone($field); The new field that is returned ($clone) has already been saved, so you don't need to save it again. Also note that it automatically assigns a new name to the field to ensure it's unique. Like with cloned pages, it adds an incrementing number to the end of the name: <?php $clone = $fields->clone($field); echo $field->name; // would print 'title'; echo $clone->name; // would print 'title_1'; You can of course go back and rename it to whatever you want. <?php $clone->name = 'something_else'; $clone->save(); Template duplicate/clone An identical clone() function was also added to the template editor. You'll see it in the 'advanced' menu when editing any Template. When you clone a template, the Fieldgroup is cloned and the template-file is also cloned if /site/templates/ is writable. Using it in the API is exactly the same as with cloning a field, and the behavior is exactly the same: <?php $template = $templates->get('basic-page'); $clone = $templates->clone($template);
  10. Nice job with the new site! Glad you found ProcessWire to be flexible with the development. Did you develop the blog section in ProcessWire too? What did you use for the contact forms?
  11. Can you post what you found with how to localize Google Maps? I've not looked into this yet, and just wanted to have a starting point. I'll update the module to support PW 2.2 languages.
  12. This one was easy to get fixed. Once I saw the 500 error page was from Apache and not PW, I knew it had to be something in the htaccess file. I've not had to use the "RewriteBase /" before, but knew there were some situations where it was necessary–glad we found one. Good to hear you are doing a rollout of a new PW site. Be sure to post in the Showcase when you launch. Your module idea sounds like a great one–I'll be glad to help when the time comes, just let me know.
  13. That "can't have children" isn't enforced by the API. That's just enforced in the admin control panel. It's perfectly valid to have a page with children and then change it's template to "can't have children" just to ensure that no more are added. Likewise, you can set it that no new pages using a given template can be created, but that doesn't mean that the existing ones have to be killed off. Glad you got it working. What you probably needed in your selector was "include=all" or "check_access=0" to ensure that it would include pages the user didn't have access to. See the Selectors section at: http://processwire.com/api/cheatsheet As for the Chrome vs Firefox and Safari thing, I have no idea. But Chrome is trying to one-up everyone, I know that.
  14. I have seen that before, though not in ProcessWire. But feasibly it can happen anywhere. It's what happens when MySQL gets abruptly killed when it's writing data or building an index (like if your webhost did an emergency reboot of the server or the process). You need to run a 'REPAIR TABLE field_body;' in a MySQL client. If you've got PhpMyAdmin, just check the box next to that table and click repair.
  15. I actually have no idea what Microsoft's Web Matrix is... I'll Google it. I didn't realize there were any similarities between C5 and PW. I used C5 a year or so ago and thought it was a fun system to test, just not a system I'd want to develop in. A very different approach they've got going there with C5. But I agree about their marketplace is a great model and one that we need to look into more.
  16. The behavior is intentional. Any time a page is saved (whether just a field from it or the whole thing), the modified date is updated. There isn't currently a way to bypass that. Though if there's demand for it, I'm sure we could find a way. I'm going to marinate on the idea a bit to see if there are any simple solutions that I'm not thinking of yet. But one question would be why wouldn't you want the modified date updated? (preference to only show admin modifications?) I'm just wondering about the broader context, to get a sense of the situations where one would want this disabled.
  17. Thanks for testing it out Jasper, glad its come in handy already.
  18. Thanks for the FTP access. I found out what the issue was. Your server needed this part of the .htaccess file uncommented: # RewriteBase / Once I uncommented that (by removing the '#') it started working. Please let me know if you run into any more issues.
  19. I wish that more people could have seen that tweet from SmashingMag. They sent that tweet to 500,000+ people at the same time, and only about 6,000 got through (and I bet it was so slow for those 6k that most gave up). I think we would have had to be on a large scale CDN to accommodate even a quarter of that traffic at once. So while the tweet went out to half a million people, I'm guessing the majority of people that clicked on it got nothing. I appreciate them tweeting about ProcessWire, but just wish we had the resources to accept their nice gesture. Hopefully we can get a more traditional link from them at some point, something that would spread the traffic out beyond the minute-by-minute nature of twitter. I would guess this is a regular problem with any tweet that gets sent by them... 500k+ followers is pretty amazing and they deserve the great reputation. But no traditional web hosting can accommodate that kind of traffic at once (as far as I know).
  20. I took a look at your PHPinfo and it seems to look okay. At first I thought I found something in your configure command with '--disable-json', but then noticed that JSON support is still there, so apparently that's not it. Though I'm not sure I understand that discrepancy. The only other things I noticed were that 32M is pretty low for memory_limit. I would bump that up to at least 64M or 128M. I don't think that's the problem here, but I do think it could be a problem at some point. Though if it's easy enough for you to change, it would be worth a shot. The last thing I noticed was that there are just a whole lot of extras in this PHP install. There are more PHP add-ons in here than I think I've ever seen before, from various caches to other things I'm not familiar with. Doubtful that any of those are the issue, but just an observation that we may come back to if nothing else turns up. I'm not sure what to tell you to try next. But if you would like, I do believe I could figure it out if I could get in through FTP or SSH and do some old fashioned debugging to determine where it's getting caught. If you would like me to do that, just PM me the info needed to get in, and I'll let you know what I find.
  21. In ProcessWire, a Fieldset is technically a type of Field, so the manner in which you edit it is no different than any other field. But what's different is in how you define the scope of the Fieldset. Fieldsets just define a starting and ending point for a group of fields. A fieldset consists of two fields: 'fieldset' and 'fieldset_END', replacing the 'fiieldset' with whatever you named it. Add your starting and ending fieldset fields to a template. Drag the 'fieldset' where you want it to start, and drag the 'fieldset_END' where you want it to end. Then save. The fields between those two will then be grouped in the page editor. Note that tabs work the same way.
  22. Could I get a look at your phpinfo()? Paste this into a file called test.php and then PM me the URL: <?php phpinfo(); One more question, is the installation that's failing installed to the domain root or a subdirectory? If it's in a subdirectory, paste in here what you've got in the .htaccess of the parent (non-PW) directory.
  23. Good idea. We could do this, and I think we definitely will, but it's not as easy as it sounds. On most servers, the file system is not writable to ProcessWire (except for /site/assets/). So the way around that is for ProcessWire to perform the upgrade through a PHP FTP client (and user supplies the login information to ProcessWire). I'm guessing that's not particularly difficult to do FTP through PHP, but I just haven't tried it yet. Extracting ZIP files is also something that's not as universal as I'd like, but we'll make do. When we build this, we'll probably do it with a module. I'm not sure I want ProcessWire to 'phone home' unless the user tells it to, so it could be a module that's not installed by default, but once installed, it will start phoning home to check on version (using LazyCron, like you suggested).
  24. Don't worry about it. Soma was just saying that there's been a lot of demand for this particular feature and it's a good idea. Keep posting and don't worry too much about searching (the search engine isn't great either). If everyone searched for it rather than posting, we might assume there wasn't much demand for this feature. I'm glad to know about the demand for repeatable fields. This is a small community and I'd almost always rather have people post than not. If we start having to keep up with hundreds of messages a day, than that would be different. But for now, when in doubt, post. You've added some good points to this discussion, and there will be a lot of good reference material in the forums for when this feature is in production.
  25. Check that your server actually supports the .htaccess file. Type "alejkfagjkaelgjk" or something at the beginning of it and save. If you don't get a 500 error on your homepage, then your Apache is not configured to use .htaccess–let me know if that's the case, and I'll tell you how to fix. Do you have SSH access to the server? You might want to do this, just in case some permissions were lost in the transfer: chmod -R og+rw /site/assets The ProcessWire installer can identify most potential compatibility problems at a server. It would be good to download a new copy of PW and install it in a subdirectory there, just to see if it finds any issues with the PHP version, htaccess support, missing drivers, etc. You don't actually need to do the installation, you just need to have a look at the first screen where it performs a system check. This will most likely reveal what the issue is.
×
×
  • Create New...