closed Aparna Module and required fields

MAD
MAD
@madc
10 years ago
600 posts
This may be something at my end but would love if someone else could test it for me.

I have created a twitter widget module using Aparna.
Not sure with normal modules as I haven't tested any others yet

If I add a custom field to the create and update forms and set them to required they work fine.
ie throw an error if they are empty

If I try to update that form and delete a required fields contents and click update it throws the error which is correct
But if I hit cancel with that field still empty it goes back to the module item page and that field is gone.

When I open the form to update it again it's empty.

So upon hitting CANCEL it still saves it.

Bug?

Need more info just ask or I can give access


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

updated by @madc: 05/22/14 05:37:44AM
MAD
MAD
@madc
10 years ago
600 posts
Tested with the profile module and it does the same. Deleted contents are deleted upon trying to update again.


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Take a look at the jrcore_form table in phpmyadmin, and check that the field actually has the value to start with. I dont think its possible that anything is being saved when clicking the cancel button.

Also, when I've been doing things with form designer and forms in custom modules I've been emptying the jrcore_form_session table between checking - you then need to refresh the form page.

Don't delete the fields in the jrcore_form table though, that will delete your form designer fields.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
MAD
MAD
@madc
10 years ago
600 posts
Sorry @SteveX
I am not talking about the fields created
I am talking about, if they are required and say, a required fields CONTENTS are emptied before hitting cancel

eg. twitter_title field
Label is Twitter Name
Say it is populated with something like
https://twitter.com/punkbp

if I update it with https://twitter.com/punkbp in there it saves fine.

If I delete the text https://twitter.com/punkbp and try and save it it throws an error....which is correct.

If the field is left empty like above and I hit cancel.....https://twitter.com/punkbp is gone
Open up the edit/update again and the field is still empty

It deletes them from the form

Can you test it at your end?
As I said it does it with profile module as well ( Only ones tested )

Only reason I caught it was that we have allowed our current artists to recreate their accounts on our build site
I noticed one that seemed strange as his profile name was missing.
All his links were http://jr.punkbp.com/-
I checked his profile and the username was missing which is a core required field.
I did some testing and I would say he accidentally deleted the name when editing his profile then hit cancel.
Profile name-------gone


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
I tried deleting a profile name here and received the error:
Quote: You have entered an invalid value for "profile name" - value must be numbers, letters, spaces or punctuation and contain no HTML. and at least 3 character(s) long

I then clicked cancel, returned to the profile settings, and you are right the name doesn't show. But it is still in the database, and if you empty the form session table it reappears. So it looks like a form session cacheing problem.

This is on a slightly out of date dev site, logged in as admin. What versions are you running? Take a look in the db, empty the form session table and see if you see similar behaviour.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
michael
@michael
10 years ago
7,717 posts
@MAD© what you are seeing is probably the form session being saved.

when you are on a form and make changes then go away and come back the form data that you have entered is preserved.

What is important is the data that is output to the public. Im pretty sure that that is not changing.
MAD
MAD
@madc
10 years ago
600 posts
Thanks @michael. Just curious how the artists managed to save his profile with no name.
Hence the testing I did to find that issue.
I will look into it further


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion
michael
@michael
10 years ago
7,717 posts
it saved like that? ok. wasn't expecting that.

JUST TO CLARIFY: a visitor to that users profile sees '' in the profiles h1 area.

We're not just talking about on the form to fill in, the form for profile was able to be saved and the profile name changed correct?

I am unable to replicate this. Could you give steps please.
MAD
MAD
@madc
10 years ago
600 posts
Not really sure how it was done @michael
We had an artist sign up as we sent a message to all existing artists to rejoin at jr.punkbp.com
I noticed one artist that his profile page was jr.punkbp.com/----
Any menu links were like jr.punkbp.com/----/audio
Their name wasn't displaying under Newest artists but their image etc was
So I opened the form in his profile and the Name area was blank
As soon as I put the name in and saved it it was all ok
So unfortunately I can't give you any steps.
I have no idea how they saved the profile with no name.


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion
michael
@michael
10 years ago
7,717 posts
I cant recreate this. Tried a few different things but cant get passed the verification system while there is no value in profile name.

The thing I thought might work was using no-allowed characters for the URL in the profile name.

Thought they might get stripped out leaving ---- but that wouldn't leave the profile name blank.

don't know sorry.
updated by @michael: 02/17/14 07:08:41PM
MAD
MAD
@madc
10 years ago
600 posts
It's cool. It only happened on that one account. If it happens again I will report it.
Cheers mate


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

Tags