Jump to content

Slav

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Slav

  1. Ok so I had the same situation! After migrate, could not Log in. To prevent this problem I found that migration should be done in a proper order. 1. Install PW on your new domain. 2. Copy and replace the /site directory. (if needed delete the content of site/assets/cache, i think I did that, sorry I repeated the process a lot of times because of failures so not sure about that anymore ) 3. modify "site/config.php" so the DB info is correct, confirm that userAuthSalt is correct (same as in your old domain or local dev version) 4. copy and replace the ".htaccess" in the root dir 5. Now export and import the DB (if I did it before previous steps then it did not work in my case, so its important to do it now) Now go into admin and check if there aren't any errors and try to log in. It worked for me! Hope it helps some of you! Cheers!
  2. Hey guys... Ok so I have a problem with a registration form password inputfield... The problem is that InputfieldPassword.js and InputfieldPassword.css are not loaded/fired. Or I dont even know exactly what is happening... Im pretty new to processwire and the website was not created by me so Im trying to figure out what has been done and how processwire works. Anyway this is how the form looks right now: ...and as you can see the styling is off (password validation check in particular)... this is what I see when page is loaded (without adding any input)... it looks like js and css files from wire/modules/Inputfield/InputfieldPassword are not firing... I dont know how it is supposed to work exactly so I dont even know where to start. Maybe someone has had similar problem and know an easy fix or can navigate me to what could cause this situation in PW. Oh by the way this problem occured when upgrading the PW version (current version 3.0.65)... everything else is ok... this is the only problem that has been found after upgrade... Appreciate all the help! Cheers!
  3. Thanks man! I really do have a field named "limit". Ok ill check all the fieldnames with the reserved names and then try again! Cheers! EDIT: Ok so I renamed the field and the error disapeared! (Y)
  4. @Can Hi is there anywhere a guide how to use this module (installation etc.)? Thanks!
  5. Hey guys, so I am trying to upgrade my processwire from 3.0.42 to 3.0.62 and when I replace wire directory I get this error: Fatal error: Exception: Field may not be named 'limit' because it is a reserved word #0 /www/apache/domains/<mydomain>/wire/core/Field.php(227): ProcessWire\Field->setName('limit') #1 /www/apache/domains/<mydomain>/wire/core/WireData.php(141): ProcessWire\Field->set('name', 'limit') #2 /www/apache/domains/<mydomain>/wire/core/WireSaveableItems.php(178): ProcessWire\WireData->__set('name', 'limit') #3 /www/apache/domains/<mydomain>/wire/core/Wire.php(383): ProcessWire\WireSaveableItems->___load(Object(ProcessWire\FieldsArray)) #4 /www/apache/domains/<mydomain>/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___load', Array) #5 /www/apache/domains/<mydomain>/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Fields), 'load I don't understand where this name 'limit' comes from or what this error means! If I replace the wire directory back to the old one then no problem. Can Anyone help? Maybe had similar problem with a reserved word...? Cheers!
  6. Hi, I have another error when trying to empty trash: Error: Call to a member function path() on a non-object (line 948 of my/website/directories/here/site/modules/ProDrafts/ProDrafts.module) Thats it ... can anyone help? EDIT: So I found the solution! For some reason it is impossible to empty trash if there are pages that are Draft's (have a paperclip next to the page name). Just Publish the pages so that the paperclip is no more and then You can empty trash without a problem! Cheers!
  7. Ok so I managed to get the result that I was searching for! This is what I did: In site/ready.php file I added this snippet: wire()->addHookBefore('Page::loaded', function(HookEvent $event) { // Get the object the event occurred on, if needed $page = $event->object; if($page->template->name == "admin" && wire('user')->id === wire('config')->guestUserPageID){ wire('session')->redirect(wire('pages')->get('/')->httpUrl); } }); I'm not sure if it is the best way to do that, but I was unable to find a way through sessions so desided to try another approach! For me it does exactly what I needed because the website I'm working on has frontend login where you can navigate to page edit according to your permissions, so the admin login page is not necessary. Well at least that's what client wanted! Anyway thanks guys for help!
  8. @kixe Where is it rendered (what file)? I want to explore that part! Thanks!
  9. @BFD Calendar Have you tried to set the $config->sessionExpireSeconds to something small like 30 sec or smthn to test if that line works or is considered at all... because I have a similar problem. I want to do some tests with session expiration, but when I change $config->sessionExpireSeconds to something small like 30 sec... it doesnt work in my case... I dont even know how long the session time is in my case... tried to wait like an hour without any activity and was still logged in... So yeah would appreciate if someone shares some knowledge on this issue...
  10. Oh this sounds exactly what I need! I will try this and see how it works! Cheers!
  11. @BitPoet, So basically there's no actual solution? Only work around? What if I want to create a user who has permission to edit a particular page and add child page's to that page and not any other page? And have many users with same permissions (particular that users page)? @Robin S, oh thanks that module looks useful!
  12. Hey Guys, I found a problem with user permissions of a PW site that Im working on. Im new to PW and not sure if there is a problem in setting permissions or is it some bug. It is difficult to explain properly but I will try... The problem is that I have a role called "exponent" and this role has permissions like page-edit, page-add, page-create etc... Now if I create a user and give that user a role of "exponent" and set permission to only edit a particular page (lets say the name of the page is "Test") then if I understand correctly, that user should have all the "exponent" role permissions only for "Test" and all the other pages are only viewable (considering that "Test" page template access is defined as well). Now if I log in as that user and look at the pages tree, then at first it looks that permissions work properly, but for some reason that I don't understand the user has permission to add new pages to the 2nd level child pages, everywhere. Here we see the only page that the user is allowed to edit. Here is how the user sees other pages (he can only view). And here is the problem. User has permission to add page to 2nd level child pages and he can do this everywhere. So my question is how is this possible or what should I do to fix this? Has anyone else had similar situation? Thanks!
  13. Yeah... I would need to redirect out of the admin template... :/ I dont think that this is what I need... All I need is not to show the admin login page to the users (ever) if they dont use the direct link to the admin login page. So basically in frontend when users login, they can direct themselves to the admin environment page edit and when they logout from admin environment it will redirect them to frontend. So basically the admin login page is not needed (at least not needed to show to users). But the problem right now is that if user is in admin environment and is editing their page and if the session expires it redirects automatically to admin login page, but what I would need is when the session expires (in admin environment) then redirect to frontend. Usually it is possible to intercept or hook session expiration and do stuff according to that but I don't know how to do that in Processwire... to sum it all up I need: When session expires redirect to frontend... I have an idea that I am going to try, so I will let you know if it works...
  14. Thank you guys for the replies! @kixe Okey this looks interesting. Where exactly should I use this snipet? And can you explain the logic little bit.. why is $customLoginUrl important there? @szabesz I checked the posts that you provided. I am already using this (in site/ready.php file): wire()->addHookBefore("ProcessLogin::executeLogout", null, "setRedirect"); function setRedirect(HookEvent $event) { $event->object->setLogoutURL(wire('pages')->get('/')->httpUrl); } And it works great, but it only works when you perform Logout procedure (I needed that aswell though) not when the session expires. In the other post they talk more about redirecting particular user to home page when he is performing login but its again not exactly what I am looking for. There is some interesting info about templates-admin "default.php" file... how does it work? Do I have to use default.php file? Whats the reason? Can anyone explain to a beginner? Cheers!
  15. Hey Guys! Im new to PW and am working on a website built on PW. Im trying to understand how sessions work in PW. Specifically what exactly is happening when session expires. The thing is that my client wants to be redirected to homepage whenever session expires, so basically he doesnt want to be redirected to admin login page when he's in the admin environment of PW(he doesnt want his clients to see the admin login page for whatever reason). Is it possible to hook to the session expiration and redirect to a specific url? And what is the correct way to do it in PW? I would appreciate the help! Cheers!
  16. @justb3a I did read the readme file... and I understood how to change the buttonText, but what I did not know was the ProcessWire way of translating (as I said before I'm completely new to PW). Now I know! Thanks!
  17. Hi again! Is there any way to translate submitButton Text? I mean like, according to what language is selected... In FormBuilder there is a place where you can assign submitButton text to different languages that are used on website... Cheers
  18. @justb3a Thank you for the quick reply! I will read the doc you provided. Ill try the hook part next. It looks that Im getting the hang of modifying the Markups and Classes. Takes time and trial/error to make it perfect, but form is taking the shape I was looking for. About how to improve the doc... hmmm... Maybe add some extra descriptions about how Markup and Classes array creates content (or at least add a link to the documentation where it is already explained) that would definitely help complete beginners like me. You get the hang of it while testing but if you are novice like me then maybe some reading material would be useful. For example describe each part of the array, like the meaning or implementaion of {attrs} and {out}. I now understand how they work and a lot of people would say that its basic knowledge but sometimes it saves alot of time if the documentation is as detailed as possible... IMO at least It could save your time as well because I see alot of repeated questions in this post. So if there is enough information in Module documentation then you dont have to "waste" your time on repeated answers. Im going to be working with this Module for few days so If I see parts that are confusing I will try to think of a way to make it less confusing. Anyway great job with this Module! You made alot of peoples life easier! Cheers!
  19. Hey guys Im new to ProcessWire and I read that ProcessWire community is very active and very helpful! So I'll say thanks in advance! Now to the question part. I am little bit confused of how to properly use this "easy contact form". So I installed the module and no problem with that, added fields and settings through PW admin and use $modules->get('SimpleContactForm')->render() to show the contact form on the page and no problem there as well. The form appears! The problem starts with the posts in this thread here... I read that people talk about a "easy_contact_form.php" template file that should be generated in site/template directory. Should it be generated manually or is it generated automatically? I didn't get that part because it is not generated in my case! Now how do I modify this form? (I mean css and html part...) I read about changing the markup and style properties in options but how does it exactly work? Is there a php file generated after you add the options that you can open later and modify the code? (I hope it doesn't sound stupid because Im not used to working with CMS's) Plus if I would like to add my own spam filer (for example recaptcha), then where do I do the changes in code? For exapmle the new invisible recaptcha is added to the submit button, so where can I get to the code where the submit button is generated? Or what is the proper way to do it? I got this project from a client where I have a big system built on ProcessWire and it has been very tough for me to make sense about everything that has been done by previous developer (no documentation left at all). I have been reading and searching alot to help me get started from somewhere but I tell you guys that so far PW does not seem very beginner friendly. There are not alot of step by step tutorials and if I search for examples on some problems then all I find is code snipets without any explanation where to use this code... Here as well all of the post give some code and talk about fixing code parts, but where exactly is the code used seems to be a common knowledge to everyone. It would be great if there would be at least one exaple page with all the files and code necessary for a beginner to scroll through and make some logical sense about how stuff works. But all in all its great to see that there is this community here that work to improve this open source CMS platform. Anyway hopefully nobody gets mad at what I wrote! Not ment to offend anyone! So yeah I would appreciate if someone can point me in the right direction, at least what to read or where to find good tutorials etc. Cheers!
×
×
  • Create New...