Answers.Body: <p>This is a Core regression bug, I have pushed a fix <a href="https://github.com/civicrm/civicrm-core/pull/28970" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/28970</a></p>
  <p>Can you please apply the [patch][1] and test?</p>
  <pre><code>
  wget https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/28970.patch
  
  patch &lt; 28970.patch
  
  </code></pre>
  <p>diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php
  index e20bd8d40b..f156b131d2 100644
  --- a/CRM/Profile/Form.php
  +++ b/CRM/Profile/Form.php
  @@ -889,10 +889,10 @@ class CRM_Profile_Form extends CRM_Core_Form {
  $this-&gt;setDefaultsValues();</p>
  <pre><code> $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, NULL);
  </code></pre>
  <ul>
  <li>$this-&gt;assign('showCMS', FALSE);
  if ($this-&gt;_mode == self::MODE_CREATE || $this-&gt;_mode == self::MODE_EDIT) {
  CRM_Core_BAO_CMSUser::buildForm($this, $this-&gt;_gid, $emailPresent, $action);
  }</li>
  </ul>
  <ul>
  <li><p>$this-&gt;assign('showCMS', FALSE);</p>
  <p>$this-&gt;assign('groupId', $this-&gt;_gid);</p>
  </li>
  </ul>
  <pre><code>
  
    [1]: https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/28970.patch
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-11T15:28:21.497Z
Answers.Text: Thank you. I was about to try your patch, but we think your version is different that ours.  We are using CiviCRM 5.68.1  If your fix is the same version, please explain how to apply this patch.  I have updated my post with the lines in the Form.php file starting at line 698
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-11T15:43:49.147Z
Answers.Text: I have updated my answer, the patch is for 5.68. Edit the file CRM/Profile/Form.php at line 892 add the + code and remove the - code from 896
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-11T22:09:15.423Z
Answers.Text: The PR is now merged and will be part of 5.69 release
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-12T10:35:09.423Z
Answers.Text: There was a release this morning which has a fix for this problem. Do you want to upgrade Civi and try?
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-13T14:41:50.500Z
Answers.Text: The upgrade to 5.69.2 did NOT resolve the issue.  Are you getting different results when you install 5.69.21 on WordPress?
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-13T14:59:49.923Z
Answers.Text: Now that I have upgraded to 5.69.2  and the issue is not resolved, I am afraid to try your patch, as you stated it is for 5.68.
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-13T17:22:05.953Z
Answers.Text: The fix is available in 5.69.2 https://github.com/civicrm/civicrm-core/blob/5.69/release-notes/5.69.2.md, can you confirm if you have CRM/Profile/Form.php over-ridden?
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-14T22:16:41.507Z
Answers.Text: Yes. CRM/Profile/Form.php was updated on 1/11/2024, the day I upgraded to 5.69.2.  Would you like to see it's contents?
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-15T11:04:23.750Z
Answers.Text: Did you update CRM/Profile/Form.php again after upgrading Civi to 5.69.2? Because the changes were included in CRM/Profile/Form.php
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-15T16:55:22.723Z
Answers.Text: I have not made any changed to CRM/Profile/Form.php
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-17T13:23:02.640Z
Answers.Text: Did the problem got resolved?
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-18T21:09:46.810Z
Answers.Text: No.  The problem has not been resolved.
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-11T11:31:35.673Z
Answers.LastActivityDate: 2024-01-11T15:43:26.153Z
Answers.LastEditDate: 2024-01-11T15:43:26.153Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>We are using CiviCRM 5.68.1 on WordPress 6.4.2</p>
  <p>Until recently, we were able to allow users to create their own WordPress userprofiles while filling out a Civi profile form.  These features are still enabled, but the username creation field is no longer visible at the top of the form.  Is this a bug with the new release of CiviCRM?  See screenshots below that confirm the features are enabled as they should be.</p>
  <p>Thank you\</p>
  <p><a href="https://i.sstatic.net/2HHZF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2HHZF.png" alt="Anyone can create a membership enabled on Wordpress" /></a></p>
  <p><a href="https://i.sstatic.net/ZVybX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZVybX.png" alt="Account creation required on CiviProfile" /></a></p>
  <p><a href="https://i.sstatic.net/FRMNe.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FRMNe.png" alt="Username creation field not displaying on page as it should be." /></a></p>
  <p>Civi/Profile/Form.php  Starting at line 698</p>
  <pre><code>public function buildQuickForm(): void {
  $this-&gt;add('hidden', 'gid', $this-&gt;_gid);
  $this-&gt;assign('deleteRecord', $this-&gt;isDeleteMode());
  
  switch ($this-&gt;_mode) {
    case self::MODE_CREATE:
    case self::MODE_EDIT:
    case self::MODE_REGISTER:
      CRM_Utils_Hook::buildProfile($this-&gt;_ufGroup['name']);
      break;
  
    case self::MODE_SEARCH:
      CRM_Utils_Hook::searchProfile($this-&gt;_ufGroup['name']);
      break;
  
    default:
  }
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-03T08:32:03.760Z
Comments.Text: Were you logged in by any chance when viewing the page?
Comments.UserDisplayName: RebeccaTregenna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-03T15:49:10.457Z
Comments.Text: I was logged in and logged off . It used to be visible either logged in or logged off.  It definitely should be visible when logged off.
Comments.UserDisplayName: fdarn
Tags: <wordpress><account-creation>
Title: User creation feature is no longer visible
ThreadText: # User creation feature is no longer visible
  
  (Asked by: username_0 on 2024-01-02)
  
  We are using CiviCRM 5.68.1 on WordPress 6.4.2
  
  Until recently, we were able to allow users to create their own WordPress userprofiles while filling out a Civi profile form. These features are still enabled, but the username creation field is no longer visible at the top of the form. Is this a bug with the new release of CiviCRM? See screenshots below that confirm the features are enabled as they should be.
  
  Thank you\
  
  [![Anyone can create a membership enabled on Wordpress](https://i.sstatic.net/2HHZF.png)](https://i.sstatic.net/2HHZF.png)
  
  [![Account creation required on CiviProfile](https://i.sstatic.net/ZVybX.png)](https://i.sstatic.net/ZVybX.png)
  
  [![Username creation field not displaying on page as it should be.](https://i.sstatic.net/FRMNe.png)](https://i.sstatic.net/FRMNe.png)
  
  Civi/Profile/Form.php Starting at line 698
  
  ```
  public function buildQuickForm(): void {
  $this->add('hidden', 'gid', $this->_gid);
  $this->assign('deleteRecord', $this->isDeleteMode());
  
  switch ($this->_mode) {
    case self::MODE_CREATE:
    case self::MODE_EDIT:
    case self::MODE_REGISTER:
      CRM_Utils_Hook::buildProfile($this->_ufGroup['name']);
      break;
  
    case self::MODE_SEARCH:
      CRM_Utils_Hook::searchProfile($this->_ufGroup['name']);
      break;
  
    default:
  }
  
  ```
  
  **Tags:** wordpress, account-creation
  
  > **Comments:**
  > **username_1**: Were you logged in by any chance when viewing the page?  
  > **username_0**: I was logged in and logged off . It used to be visible either logged in or logged off.  It definitely should be visible when logged off.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-01-11. Score: 2
  
  This is a Core regression bug, I have pushed a fix <https://github.com/civicrm/civicrm-core/pull/28970>
  
  Can you please apply the [patch][1] and test?
  
  ```
  
  wget https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/28970.patch
  
  patch < 28970.patch
  
  ```
  
  diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php
  index e20bd8d40b..f156b131d2 100644
  --- a/CRM/Profile/Form.php
  +++ b/CRM/Profile/Form.php
  @@ -889,10 +889,10 @@ class CRM\_Profile\_Form extends CRM\_Core\_Form {
  $this->setDefaultsValues();
  
  ```
   $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, NULL);
  
  ```
  
  * $this->assign('showCMS', FALSE);
    if ($this->\_mode == self::MODE\_CREATE || $this->\_mode == self::MODE\_EDIT) {
    CRM\_Core\_BAO\_CMSUser::buildForm($this, $this->\_gid, $emailPresent, $action);
    }
  
  * $this->assign('showCMS', FALSE);
  
    $this->assign('groupId', $this->\_gid);
  
  ```
  
    [1]: https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/28970.patch
  
  ```
  
  > **Comments:**
  > **username_0**: Thank you. I was about to try your patch, but we think your version is different that ours.  We are using CiviCRM 5.68.1  If your fix is the same version, please explain how to apply this patch.  I have updated my post with the lines in the Form.php file starting at line 698  
  > **username_2**: I have updated my answer, the patch is for 5.68. Edit the file CRM/Profile/Form.php at line 892 add the + code and remove the - code from 896  
  > **username_2**: The PR is now merged and will be part of 5.69 release  
  > **username_2**: There was a release this morning which has a fix for this problem. Do you want to upgrade Civi and try?  
  > **username_0**: The upgrade to 5.69.2 did NOT resolve the issue.  Are you getting different results when you install 5.69.21 on WordPress?  
  > **username_0**: Now that I have upgraded to 5.69.2  and the issue is not resolved, I am afraid to try your patch, as you stated it is for 5.68.  
  > **username_2**: The fix is available in 5.69.2 https://github.com/civicrm/civicrm-core/blob/5.69/release-notes/5.69.2.md, can you confirm if you have CRM/Profile/Form.php over-ridden?  
  > **username_0**: Yes. CRM/Profile/Form.php was updated on 1/11/2024, the day I upgraded to 5.69.2.  Would you like to see it's contents?  
  > **username_2**: Did you update CRM/Profile/Form.php again after upgrading Civi to 5.69.2? Because the changes were included in CRM/Profile/Form.php  
  > **username_0**: I have not made any changed to CRM/Profile/Form.php  
  > **username_2**: Did the problem got resolved?  
  > **username_0**: No.  The problem has not been resolved.  
  
  ---
  
  