Jump to content

FrancisChung

Members
  • Posts

    472
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by FrancisChung

  1. I assume you meant traversing the Page Tree and entering a Blog Post as a page? I think for a CMS administrator or a Developer, that is a fine workaround. But unfortunately we're trying to convince bloggers to come write for our site and that particular UX in Processwire is not a great selling point for us IMHO. I think the Blog Panel is actually a much better UX for a non technical person to enter blog entries into. Just a shame that adding a single custom field to it as not as straight forward.
  2. So a selector of "roleid = <id of role>" ? Ok I will try that. Thanks !
  3. Hi Kongondo, I've noticed there's a Quick Post section in the Posts Menu in the Blog Dashboard. But it's not showing a field I added to the Blog Post Template. I'm guessing I have to modify some module code to get it showing (& saving)? Do you know which modules I have to look at? Or is there another way that I've overlooked?
  4. After much searching, it looks like I needed a *= operator instead of = for Roles? AAArgh ... i.e. Not roles=blog-author but roles*=blog-author. https://processwire.com/talk/topic/10628-error-saving-page-fields/ Seems a bit inconsistent on how Selector is supposed to work, at least going by the examples & documentation I've seen.
  5. Hi I was wondering if there's a workaround for this? I created a new field called blog_author which is a page field. It has a selector of "'template=user, roles=editor". When I try and save down a blog post that has the new blog_author field in it, it's returning the following error. Error saving field "blog_author" - Page 1415 is not valid for blog_author (Page 1415 does not match findPagesSelector: template=user, roles=blog-author) I can see the blog authors and select one without errors. The error occurs when I'm saving. Have tried to make the template type a basic page field type (instead of user) , but it returns the same error.
  6. Aaah the Processwire way. Had a feeling you might say something similar. I'm slowly getting accustomed to it nonetheless
  7. Ok thanks for the Homework Feel like I'm back in school again. I've read the docs and some forum articles as you suggested. Didn't realise you had to allocate Add-Children permissions as well on the Blog-Posts to be able to add a new Blog-Post. (Create Page & Edit Page permissions was not enough) Was there a reason no permissions are set by default during the initial installation? Seems to me a Blog-Author role implies it should be able to create & edit Blog Posts by default.
  8. Ok I worked out that perhaps the blog-author users have no permissions to see any pages. So I'm looking at the Blog Template and it has an option to let me choose permissions. However, I can't seem to click on checkboxes that enables it. http://imgur.com/K8JFQDM Any ideas?
  9. Hi, I have a question regarding logging in the Processwire Module as a Blog Author. I created a user that is a member of the blog-authors group. When I login to the Processwire admin page using the user's credentials, this is all I see is this. http://imgur.com/o5hbrWG Had a look, and it has the following error log entry. DATE/TIME USER URL TEXT 8 seconds ago 2015-10-18 14:05:33 admin /processwire/page/list/?id=id&render=render&am… SQLSTATE[HY000]: General error: could not call class constructor [pageClass=Page, template=] The URL Link above is : http://localhost:8888/processwire/page/list/?id=id&render=render&start=start〈=lang&open=open&mode=mode Logging in as Admin, there are no issues with the blog. I can do everything including entering blog posts. There are no error log entries for Admin/Blog Module. FYI, I have set couple of child pages of the Blog as hidden. Could this be the cause?
  10. Hi Pete, Thanks for the prompt reply (on a Sunday!) I'm using Processwire 2.6.x. I would be hesitant to move to v3.x mainly because it's Alpha software and it's for a site that's already Live at the moment. I also haven't built enough Unit Tests to be confident to doing such a migration. You mentioned Root Namespace in your reply, so I tried to instantiate using \PageArray and it seems to have worked. Thanks again!
  11. Hi there, I'm having trouble instantiating a PageArray and was wondering if i've overlooked something very obvious (Won't be the first time!) I've included a snippet of the code The Error I'm getting is "Class 'Site\PageArray' not found". I'm using namespaces as I've had name collisions before. Still stumbling my way through PHP and any guidance would be much appreciate. ---------------------------- G namespace Site; class Data { /** * Wrapper function to return items inside a PageArray. * @param $items * @return PageArray - A PageArray containing all the items passed in */ static function PageArrayWithChildren($items) { //$array = new wire(PageArray); $array = new PageArray(); foreach($items as $item) { $array->import($item->children()); } return $array; } }
  12. I've given up on this for now & went for completely seperate site installations.
  13. Yes I agree with it being dangerous ... but I was in a desperate corner and I was willing to take the risk. As for the script itself and '%Blog%' being dangerous, I do agree but that's why I also had Select statements in there for the user to check before they delete. Hopefully no one else will have to go through what I did That XDebug issue, I only recently discovered what the cause & its outreaching effect was. Also I first installed the blog quite a while back, long before XDebug became a big issue and i was searching around for answers. I definitely will have a "Cleanup" celebration later this evening with some well earned bevvies!
  14. Hi Kongondo, Thanks for the instructions, Kongondo! Much appreciated! Unfortunately, it didn't work too well for me as it didn't clean up everything (as you mentioned) and I ended up deleting entries off the CMS as the error messages dictated. I finally managed to get it install (I think!) with 1 error message that I'm not sure is an error, as the comments table actually is created by the installation. I've also remembered why I got into this predicament. The very first installation I did failed because my xdebug.max_nesting_level was set to 100 and not something higher & the installation process reached that limit. I was meant to come back to it, but never had the time. After I did the cleanup & increased this number to 300, I got new error messages which I worked through. which I fixed eventually. I will also try and post the SQL I used in seperate post. http://imgur.com/V6OExBn Rollback instructions. Use at your own risk. 1) Export your site or DB first before you do anything else. Backup! Backup! Backup! 2) Run the following script start transaction; select * from templates where name like '%blog%'; delete from templates where name like '%blog%'; select * from templates where name like '%blog%'; select * from fields where name like '%blog%'; delete from fields where name like 'blog%'; select * from fields where name like 'blog%'; select * from pages where name like '%blog%'; delete from pages where name like 'blog%'; select * from pages where name like 'blog%'; select * from fieldgroups where name like '%blog%' select * from fieldgroups_fields where fieldgroups_id in ( select id from fieldgroups where name like '%blog%' ) delete from fieldgroups_fields where fieldgroups_id in ( select id from fieldgroups where name like '%blog%' ) delete from fieldgroups where name like '%blog%' rollback; If the Rollback attempt looks fine, run a Commit version of it.
  15. Have you got XDebug turned on? If so, try turning it off?
  16. I was having this issue which turns out due to a bug with XDebug leaving too many files open as it wasn't closing them down properly. AFAIK it hasn't been fixed yet. So only turning on XDebug when you need it plus temporarily increasing the open file limits was a temporary solution that kinda works. (MAMP/ OSX)
  17. Yes, I don't know how I got myself into this predicament. I did press the run install wizard and everything indicated that the installation went fine. Run Install Wizard won't run now because of all the existing fields, templates etc & the installation rolls back. I'm happy to start again. The reason I need to start again (besides this) is that I can't seem to add Authors under the Authors page and wasn't sure I had to do it via the Blog Module. I will keep an eye out on logs etc in case it happens again ... touch wood it doesn't. Having a bad day and hoping this is the start of my change of fortunes
  18. Hi there, I was wondering if there is anyway of getting some basic page stats (like number of times a page is visited etc) without having to resort to 3rd party tools like Google or other analytics tools? Are there any built-in-tables or logs that keeps this information? Thanks in advance.
  19. 1) Dev Install. I also made a backup overnight just in case 2) Local Machine. Head scratcher this one! 3) No code alteration. 4) Yes the admin account. The only account I normally use 5) See below 6) Do you mean reinstalling the module or physically copying files across to the Blog Module directory? I've tried to reinstall but PW says I already have the latest version. http://imgur.com/qQPbZXQ Just another thought, perhaps have the Cleanup Code available as a separate module could be good too?
  20. I've just tried to uninstall the modules, but because I don't have access to the Cleanup option I presume I can't uninstall the module. Had a look at the docs, and it refers to the cleanup option .... What's the best way to remove it manually?
  21. Have you checked your Apache, MySQL, PHP logs?
  22. Try googling using the words "Expandable Search Codepen". There's tons of examples out there and you can pick out the one that has the characteristics you're looking for. Good hunting!
  23. Hi there, I'm trying to set up different instances of our website so I thought I'd try it out locally first before deploying out to the real world. I'm interested in a multi-site/independent DB setup so I'm following the instructions (Step1 Alternative) in https://processwire.com/api/modules/multi-site-support/ The steps I've taken are : 1) I've copied my /site folder to /site-dev. 2) Modified index.config.php and moved it to the webroot 3) Modified config.php in site-dev and changed the DB credentials. I thought this was all the steps I needed to take but it didn't work. I've also added an entry in /private/etc/hosts for dev.localhost to point to 127.0.0.1 Is there something else I have overlooked? Thanks in advance! ------------------ index.config.php function ProcessWireHostSiteConfig() { return array( /* * Some Examples (you should remove/replace them if used). * Just note that the values must begin with 'site-'. * */ 'dev.localhost' => 'site-dev', /* * Default for all others (typically /site/) * */ '*' => 'site', ); } config.php $config->dbHost = 'localhost'; $config->dbName = 'SSS-Live';
  24. Turns out, the above didn't work too well. I'm having to manually increase the limits for now using the following command. sudo launchctl limit maxfiles 655356 655356 I'm still getting the odd errors, but the frequency far far less and it's managable. P/S I also found out this is due to a bug in XDebug where it's not closing all the file handles it is opening. Unfortunately, it still hasn't been fixed yet. The XDebug module I'm using is part of MAMP Pro. I guess the alternative is to setup Zend Debugger, but I didn't managed to get it work the first time I attempted it.
  25. If Superuser == Admin user, then yes perhaps something went wrong during the installation. I had a check at the logs (Modules) and couldn't see any indicator that the installation had gone wrong. When I get a chance to do a fresh install, I will try again from scratch and let you know. Are you aware of any clashes with other modules, besides the the Blog Module?
×
×
  • Create New...