Jump to content

Slav

Members
  • Content Count

    19
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Slav

  • Rank
    Jr. Member
  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!
×
×
  • Create New...