Recommended Posts

Hi there,

I'm developing locally on my laptop and we have a testing server where I deploy via rsynch + running a DB Dump script.

(Exported via MySQLWorkbench)

I've noticed that the admin password becomes invalid every time a DB Dump script is run on the server.

Is this possibly because there's a hash and/or salt stored alongside the password and my local one is not valid on the server?

Are there better practices of synching between my local Processwire and the server instance to prevent the admin password being invalidated?

Share this post


Link to post
Share on other sites

This should normally work ok, but to answer the question, the password salt is in the site/config.php and nowhere else.

Share this post


Link to post
Share on other sites

Perhaps I should resynch the config.php files between the 2 machines and try again.

Thanks for the answer, LostKobrakai

Share this post


Link to post
Share on other sites

I have the same issue after DB syncing, i got it that salt in the config is the issue but as said several times its known that passwords will not work anymore after site migration. As far as i can say its not about the salt because nobody changes the salt for the migration. It wouldnt even be that bad if the user account data wouldnt be in the page table which of course has to be deployed if i add changes to the page. I deploy sometimes 10 times a day at least to staging areas and i am tired of reseting the passwords again and again. Isnt there any way to disable this? If a user changes his password by himself i will never be able to deploy without knowing his password?

Share this post


Link to post
Share on other sites

If the user salt is correctly deployed and your fields_pass table is also correctly moved there should be no problems. The only issue I can imagine is that one of your environments might support blowfish encryption and the other one doesn't, which would result in different hashing behaviors.

A few words about your rant about users being part of the pages table: If you have just about any amount of user-generated / user-changeable content you cannot overwrite the db just with a sql dump. You'll need to go different ways if you need to deploy (possibly automatically) your database changes with a staging/live environment. Therefore it shouldn't matter that much if users are pages as well or not.

  • Like 1

Share this post


Link to post
Share on other sites

The Blowfish encryption is an interesting detail, will check that. Would make sense.

Of course i need to sync in both directions but if it would be a separate table i would simply exclude them. 

Share this post


Link to post
Share on other sites

Migrated my dev environment from MAMP to vagrant box and the issue doesnt happen anymore. So you are right that the reason is an environment detail, in my case of MAMP.

Share this post


Link to post
Share on other sites

I have the same problem with Mamp.

Has someone already a solution to make it work with mamp ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By nuel
      Hi there
      Basically I want to call code within a ProcessWire page that isn't used as a template. Example: www.mypwpage.com/myphpfile.php
      I have a working PW Website with a couple of pages like /artists, /releases, /videos etc. Now I need a page /download without any editable fields in the backend, just calling some PHP code (that was coded by another guy) containing a form that checks unique download-codes in a second database and starts the download of the desired file. The script is working fine right now as part of a static website, but since I built PW behind the site, this independent «Download Section» of the page doesn't work anymore.
      Right now I have the main file download.php as a page template on a newly created empty page called /download, so until now the form is working (wow). After sending the form containing the download-code, the file check_code.php in a subfolder /site/templates/download is called and that's where I get an error.
      Any help?
    • By MoritzLost
      I'm trying to build a bitwise filter for a database query for my textformatter module, and I stumbled over some page statuses I don't quite understand:
      /** * Page has pending draft changes (name: "draft"). * #pw-internal * */ const statusDraft = 64; /** * Page has version data available (name: "versions"). * #pw-internal * */ const statusVersions = 128; If I'm not mistaked, there's no way to create multiple draft of a page in the ProcessWire core without module, is that correct? I initially assumed was the status assigned to unpublished pages, but the unpublished status corresponds to id 2048. Is the only way to create drafts with the ProDrafts module?
      For my purposes, I just need to understand how I should treat those statuses. I'm trying to get all pages that are published and either hidden or not hidden (I want to make this configurable). Do I need to exclude pages that have the statusDraft, or statusVersions? Only one of them? Only in combination with other statuses? Or can I safely ignore those (so it's fine if the pages have the status or not)? I don't own the ProDrafts module, so I can't check the code to see how individual drafts are stored and how the draft ids correspond to the published id.
      Any insight into those statuses is appreciated. Thanks in advance!
    • By mjut
      Hello!
      I am trying to get some extra css-file into my admin templates. I managed to modify my admin.php to this:
      <?php namespace ProcessWire; require($config->paths->adminTemplates . 'controller.php'); echo "<link rel='stylesheet' type='text/css' href='" . $config->urls->templates . "css/admin.css'>"; By doing so, the css <link> is added to the very end of each parsed admin-html. (right AFTER the closing </body> tag.)
      That causes some trouble. e.g. the page tree is not displaying any more. Although, other pages are working - like the edit form of a page.
      My question: is there a correct way of adding my extra css to the admin area?
      Thanks for you help!
      Stephan
       
    • By LukeCage
      Hi! I have a big problem with a client of mine. I have to do something that i don't do very often with processwire, and i'm very afraid that i'm not gonna able to do it. So i write to search some help from you experts.
      The website that i'm gonna create will have a database with infos about users. This users are not the actual registrered users, but possible users. I'll try my best to explain this. What i will have is a datasheet in the database with infos about all the users (name, surname, fiscal Code) that can register to the website. So during registration the website is confront with this database of people, and accept or not your registration to the website.
      Now. The problems are: the client need a page in the CMS to insert this people in the first place (Custom Admin Page?) in the database. I read what i need to create it, but i don't understand what i need to do next. What i need to do for reading and writing to the database, with data, directly from a custom admin page in processwire?
      The other thing is. I can do this control during registration? I Can extend fields in the user account?
      I'm completely in your hands.
    • By Robin S
      Breadcrumb Dropdowns
      Adds dropdown menus of page edit links to the breadcrumbs in Page Edit.

      Installation
      Install the Breadcrumb Dropdowns module. The module requires ProcessWire >= v3.0.83 and AdminThemeUikit.
      There is a checkbox option in the module config that determines if the breadcrumb dropdowns will include pages that the user does not have permission to edit.
      Features/details
      The module adds an additional breadcrumb item at the end for the currently edited page. That's because I think it's more intuitive for the dropdown under each breadcrumb item to show the item's sibling pages rather than the item's child pages. In the dropdown menus the current page and the current page's parents are highlighted in a crimson colour to make it easier to quickly locate them in case you want to edit the next or previous sibling page. Unpublished and hidden pages are indicated in the dropdowns with similar styling to that used in Page List. If the option to include uneditable pages is selected then those pages are indicated by italics with a reduced text opacity and the "not-allowed" cursor is shown on hover. There is a limit of 25 pages per dropdown for performance reasons and to avoid the dropdown becoming unwieldy. If the current user is allowed to add new pages under the parent page an "Add New" link is shown at the bottom of the breadcrumb dropdown. If the currently edited page has children or the user may add children, a caret at the end of the breadcrumbs reveals a dropdown of up to the first 25 children and/or an "Add New" link. Overriding the listed siblings for a page
      If you want to override the siblings that are listed in the dropdowns you can hook the BreadcrumbDropdowns::getSiblingsmethod and change the returned PageArray. For most use cases this won't be necessary.
      Incompatibilities
      This module replaces the AdminThemeUikit::renderBreadcrumbs method so will potentially be incompatible with other modules that hook the same method.
       
      https://modules.processwire.com/modules/breadcrumb-dropdowns/
      https://github.com/Toutouwai/BreadcrumbDropdowns