BuddyDev

Search

How to add an error message in BuddyPress Xprofile Custom Field Types plugin

  • Participant
    Level: Enlightened
    Posts: 71
    Lefteris on #39115

    Hello great team 🙂

    I have been using your the very good plugin BuddyPress Xprofile Custom Field Types and using an Image field and works just fine. Setting a limit in upload allowed size also. The only problem is that when a user is not complying with the size limit or the file type, there is no error message getting displayed. Many users are not sure and getting confused.

    Would it be possible to set a simple error message (maybe a general one – there was an error with the upload, please check file size and type) when a user is uploading but not complying.

    Could i just set it with a hook in functions.php?

    Also i was searching for a field that could give the possibility for the user to choose between the 7 days of the week and between the 24 hours of the day. Something like Monday 5-8p.m , Friday 6-9p.m, multiple times or a single time. Is there any?

    Thank you very much for your time and your help 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #39122

    Hi,
    Thank you for using the plugin.

    Is it happening for very large size file or normal files.

    There are times when server rejects a large file and we will have no idea if a file was even submitted(the files array is empty). We can not show error in that case. To handle that, you will need to get the max allowed file size directives( upload_max_filesize, post_max_size) changed.

    Our errors are at application level and are unable to show the error if the file is not reported to us by server.

    Also, is it happening on registration or profile update? May be the error message is getting overridden, I can look into it.

    About the Date and time field, thank you for the suggestion. We will look into it in future.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 71
    Lefteris on #39148
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #39153
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 71
    Lefteris on #39420

    Hello Brajesh,

    Thank you very much for your reply 🙂 \

    Did you manage to push an update on the fix?

    Please let me know 🙂

You must be logged in to reply to this topic.

This topic is: not resolved