Search

Ah. I spoke too soon. The Update Password filter has the same issue as the member edit event. If you happen to leave both password and confirm password fields empty, the event does not fail gracefully:

Symphony Fatal Database Error
Column 'strength' cannot be null
An error occurred while attempting to execute the following query
INSERT INTO `sym_entries_data_150` (`entry_id`, `password`, `strength`, `length`) VALUES ('1', 'THE-HASH-VALUE-GOES-HERE', NULL, '7')

Thanks for looking into this, bauhouse. It definitely should not be exploding like it is at the moment for you.

I'll try creating a new test section tonight, because I can't reproduce these errors with my current setup.

I shall let you know :)

@bauhouse, are you able to jump onto Talker or Convore in the next few hours? I can't reproduce either of your bugs and would like to find out a bit more about your setup :)

Sorry, I wasn't available quite that early in the morning (here in Vancouver). :P

If you're not able to reproduce these bugs, my setup may not be quite right. I'm basically taking the old Forum ensemble with a whole bunch of other stuff added to it to build our agency's intranet and public site. Then, I ripped out all the data sources, events and fields from the old Members and Forum extensions and I'm trying to see how far I get rebuilding the same functionality as the Forum ensemble with the Members Beta extension.

I'll see if I can use the Schema Migration extension to export my setup to a clean install of the Symphony integration branch to see if I experience anything different before I bug you with any more issues.

Brendan, can you explain why the extension provides a Members: Activate Account event plus an event filter named Members: Activation? What's the idea behind it?

I'm able to successfully update my password without any error messages, but the event does return as successful if the form is submitted without anything entered into the fields.. anyone else able to replicate that?

Also, I was confused by the example form markup as well.. As it pulls in all the fields associated with the member section. I'm not completely sure how to get the functionality I'd like to out of it.. I'd like the user to have to enter/verify their current password to be able to change it to something else. Is this already possible somehow?

The process for changing a password is different from the old implementation where the user was required to provide the old password and a new password.

This implementation seems only to have a way to update a password with a password and password confirmation field. I suppose the assumption is that the user must already be logged in to change the password. But it would probably make more sense, to be consistent with the Symphony Authors UI, to have Old Password, New Password and Confirm New Password fields.

Yeah, I know it's excessive, but I prefer that extra level of security.. in-case the user left their account logged-in at a public place or something. Not that the chances of someone else going to my same site are high or anything.. :)

@brendo, I hope it's okay that I'm spamming this thread with bug reports. Or should I be using the issues area in GitHub for these bug reports? Anyway, I'm trying to reproduce my set up in a clean install of Symphony to test whether my issues have to do with my install.

It seems I've found another bug (Edit: fixed by checking out previous commit):

I cloned the latest Symphony integration branch (2.2.1 Beta 1) and the latest Members extension integration branch (1.0 Beta 2) and the latest commit of the Schema Migration extension. I installed Symphony, enabled all extensions, enabled Enable tracking of section and page changes in Preferences and copied the following migration file into sections/members.xml:

<?xml version="1.0" encoding="UTF-8"?>
<section guid="4d99ee71d0dc4">
  <meta>
    <name>Members</name>
    <handle>members</handle>
    <sortorder>10</sortorder>
    <entry_order>1</entry_order>
    <entry_order_direction>asc</entry_order_direction>
    <hidden>no</hidden>
    <navigation_group>Forum</navigation_group>
    <guid>4d99ee71d0dc4</guid>
  </meta>
  <fields>
    <entry>
      <required>yes</required>
      <show_column>yes</show_column>
      <label>Name</label>
      <element_name>name</element_name>
      <type>input</type>
      <parent_section>1</parent_section>
      <sortorder>0</sortorder>
      <location>main</location>
      <guid>4d99ee71d1b1c</guid>
      <validator></validator>
    </entry>
    <entry>
      <required>yes</required>
      <show_column>yes</show_column>
      <label>Username</label>
      <element_name>username</element_name>
      <type>memberusername</type>
      <parent_section>1</parent_section>
      <sortorder>1</sortorder>
      <location>main</location>
      <guid>4d99ee71d1be2</guid>
      <validator></validator>
    </entry>
    <entry>
      <required>yes</required>
      <length>6</length>
      <strength>good</strength>
      <show_column>no</show_column>
      <label>Password</label>
      <element_name>password</element_name>
      <type>memberpassword</type>
      <parent_section>1</parent_section>
      <sortorder>2</sortorder>
      <location>main</location>
      <guid>4d99ee71d1c96</guid>
      <salt>5Ms1E8OcpWUgC6g1</salt>
    </entry>
    <entry>
      <required>yes</required>
      <show_column>yes</show_column>
      <label>Email Address</label>
      <element_name>email-address</element_name>
      <type>memberemail</type>
      <parent_section>1</parent_section>
      <sortorder>3</sortorder>
      <location>main</location>
      <guid>4d99ee71d1d45</guid>
    </entry>
    <entry>
      <show_column>yes</show_column>
      <location>sidebar</location>
      <required>yes</required>
      <label>Role</label>
      <element_name>role</element_name>
      <type>memberrole</type>
      <parent_section>1</parent_section>
      <sortorder>4</sortorder>
      <guid>4d99ee71d1df8</guid>
      <default_role>1</default_role>
    </entry>
    <entry>
      <show_column>yes</show_column>
      <location>sidebar</location>
      <required>no</required>
      <label>Activation</label>
      <element_name>activation</element_name>
      <type>memberactivation</type>
      <parent_section>1</parent_section>
      <sortorder>5</sortorder>
      <guid>4d99ee71d1ea6</guid>
      <code_expiry>1 hour</code_expiry>
      <activation_role_id>0</activation_role_id>
    </entry>
    <entry>
      <required>no</required>
      <show_column>no</show_column>
      <label>Website</label>
      <element_name>website</element_name>
      <type>input</type>
      <parent_section>1</parent_section>
      <sortorder>6</sortorder>
      <location>main</location>
      <guid>4d99ee71d1f52</guid>
      <validator>/^[^s:/?#]+:(?:/{2,3})?[^s./?#]+(?:.[^s./?#]+)*(?:/[^s?#]*??[^s?#]*(#[^s#]*)?)?$/</validator>
    </entry>
    <entry>
      <required>no</required>
      <show_column>yes</show_column>
      <label>Location</label>
      <element_name>location</element_name>
      <type>input</type>
      <parent_section>1</parent_section>
      <sortorder>7</sortorder>
      <location>sidebar</location>
      <guid>4d99ee71d1ffd</guid>
      <validator></validator>
    </entry>
    <entry>
      <required>no</required>
      <show_column>yes</show_column>
      <label>City</label>
      <element_name>city</element_name>
      <type>input</type>
      <parent_section>1</parent_section>
      <sortorder>8</sortorder>
      <location>sidebar</location>
      <guid>4d99ee71d20af</guid>
      <validator></validator>
    </entry>
    <entry>
      <show_column>no</show_column>
      <location>sidebar</location>
      <required>no</required>
      <label>Timezone</label>
      <element_name>timezone</element_name>
      <type>membertimezone</type>
      <parent_section>1</parent_section>
      <sortorder>9</sortorder>
      <guid>4d99ee71d215c</guid>
      <available_zones>AMERICA</available_zones>
    </entry>
    <entry>
      <location>sidebar</location>
      <show_column>yes</show_column>
      <label>Email Opt-in</label>
      <element_name>email-opt-in</element_name>
      <type>checkbox</type>
      <parent_section>1</parent_section>
      <required>no</required>
      <sortorder>10</sortorder>
      <guid>4d99ee71d2207</guid>
      <default_state>off</default_state>
      <description>Send me email when there is important news.</description>
    </entry>
  </fields>
</section>

Clicking on the Migrate button successfully adds the section and fields, but trying to create a new entry in the Members section resulted in the following error:

Argument 1 passed to fieldMemberTimezone::buildTZSelection() must be an array, null given, called in /Users/stephen/Sites/sym/members/extensions/members/fields/field.membertimezone.php on line 203 and defined
/Users/stephen/Sites/sym/members/extensions/members/fields/field.membertimezone.php line 99

94       * @param array $data
95       * @param string $prefix
96       * @param string $postfix
97       * @return XMLElement
98       */
99      public function buildTZSelection(Array $data = array(), $prefix = null, $postfix = null) {
100         $groups = array();
101
102         if ($this->get('required') != 'yes') $groups[] = array(NULL, false, NULL);
103

I tried deleting the timezone field and I was able to view the create new page in the Members section. I tried creating the timezone field again and it resulted in the same error as above.

I was able to back up to the previous commit and the above error goes away.

I think this may be an issue for the Members extension.

Edit: This is indeed embarrassing. The permissions were wrong on the directories. Never mind.

So, I installed Symphony from the integration branch. I installed Members and Schema Migration extensions, created the Members section by clicking Migrate (with the XML from above). I was able to create a new member entry in the Symphony admin. After setting the section as the Members section in preferences and creating some roles, when I tried to edit the role of the member entry, I received the following error:

Column 'strength' cannot be null
An error occurred while attempting to execute the following query
INSERT INTO `sym_entries_data_3` (`entry_id`, `password`, `strength`, `length`) VALUES ('1', '9df2f96bb76141fb8bca7097816997ba5712b8ad', NULL, '7')

So I tried different passwords and realized that it was the specific password that I was using that was causing the issue. But it seems to be any seven character password that ends with a number and a punctuation mark:

 Passw1!

It's the strangest thing. Try saving the above as a new password, then resave the entry without entering any values in the password fields. Let me know if you have the same error as above.

Brendan, can you explain why the extension provides a Members: Activate Account event plus an event filter named Members: Activation? What's the idea behind it?

The Members: Activate Account event is used when the Member is adding their Activation code to their account, so they are activating it.

The Members: Activation filter is to be attached to the Registration event to always force Activation to be 'no' when a Member is registering for your site. This prevents any DOM hacking to make them activate themselves.

Of course if you aren't using the Activation field, neither of these apply to you :)

I'm able to successfully update my password without any error messages, but the event does return as successful if the form is submitted without anything entered into the fields.. anyone else able to replicate that?

I replied on Github to an issue similar to this just a few moments ago, I'll repost it here.

The purpose of the Member: Update Password filter is to allow users to not have to enter their password everytime they submit their profile. It works by adding an optional key to the $_POST array, which pretty much says, if the password fields are empty, but optional is around, just remember their current password.

If you want to force an update, or just have the field respect it's 'Required/Not Required' setting, don't attach the Member: Update Password filter to your event.

I'm thinking Member: Optional Password would be a more appropriate name for this filter, what do you think?

Also, I was confused by the example form markup as well.. As it pulls in all the fields associated with the member section. I'm not completely sure how to get the functionality I'd like to out of it.. I'd like the user to have to enter/verify their current password to be able to change it to something else. Is this already possible somehow?

You don't have to use all the fields in your form, that's just the example markup for the entire section. You are free to remove fields are you require.

That situation isn't currently possible, bauhouse's assumptions are correct. I'll look at adding it in, as it's more common then what is currently in place.

@brendo, I hope it's okay that I'm spamming this thread with bug reports. Or should I be using the issues area in GitHub for these bug reports? Anyway, I'm trying to reproduce my set up in a clean install of Symphony to test whether my issues have to do with my install.

Github is preferred as we can keep track and mark them off as I/someone fixes them, but here's also good for exposure incase other users are encountering the same issues.

It's the strangest thing. Try saving the above as a new password, then resave the entry without entering any values in the password fields. Let me know if you have the same error as above.

Bingo, can reproduce now :) I'll look at shortly and push a fix for that and Timezone in the next couple of hours. Thanks for testing!

Both issues have been fixed and pushed to Github, please let me know how you go :)

The purpose of the Member: Update Password filter is to allow users to not have to enter their password everytime they submit their profile. It works by adding an optional key to the $_POST array, which pretty much says, if the password fields are empty, but optional is around, just remember their current password.

Ah, this makes sense.. I was actually wanting this on my "edit profile" page initially, but I was using the registration event instead, which required the password on submit.. So this set up is actually perfect for what I first envisioned in my head, not sure why I didn't put the two together until now.

Thanks for clarifying, either way.

At least a couple of people have mentioned a Register or Registration event in this thread. I haven't found such an event in the Members extension. Is that a custom event?

Nope, it's a standard event you create yourself :)

Brendan, thank you very much for your explanations. Indeed I find it rather tricky to setup Members functionality. I think that this extension will need a much more elaborate README or an accompanying tutorial describing a "typical" setup.

Regarding the naming: For the event filters we might consider longer, more descriptive names. (If you like, please pass this question to the appropriate Working Group). For example:

  • The Members: Activation filter might be called Members: Prohibit Activation by POST data
  • The Members: Update Password filter might be called Members: Auto-POST Current Password

(I now remember that we talked about the Activation filter -- but just a few days later I had no idea what this thing does!)

Is there any special reason why the Reset Password event works with email addresses only (instead of email or username)?

Regarding the naming: For the event filters we might consider longer, more descriptive names. (If you like, please pass this question to the appropriate Working Group). For example:

Good idea. Something to consider though is that if we name them very specific, should they evolve later on the name won't make complete sense and changing it would require upgrading and updating events to save the filter

Is there any special reason why the Reset Password event works with email addresses only (instead of email or username)?

Nope, that's just an oversight by me, so it's a bug :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details