• I’m running across a bunch of bugs while trying to set up the profile form that are starting to get frustrating, so any help would be grandly appreciated. Specifically:

    1. The “biography” field doesn’t seem to be able to handle apostrophes.
    2. I put in a YouTube field but when I put in a video URL it shows a “playback error.” When I have debug on I get this notice: Notice: Undefined offset: 1 in [...] /wp-content/plugins/ultimate-member/core/um-short-functions.php on line 1315.
    3. It won’t let me upload pictures. I’ve triple-checked the file size limits but when I try to upload a cover photo or a profile photo I just get a red notice that says “Error:” with no further information.

    I’m new to the plugin so maybe I’m missing something but I can’t figure out what’s going on with the above issues. My website has not launched yet so I cannot share the URL, but let me know if I can give you any other info that might help.

    Many thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Head Goldfish

    (@shoelaced)

    UPDATE: The iframe src for the YouTube videos all say “https://www.youtube.com/embed/” rather than “https://www.youtube.com/embed/%5Bvideo ID]” in the Chrome Inspector. So it seems that it isn’t able to get the video ID from the URL?

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @shoelaced,

    Do you have the latest 1.3.88 version of the Ultimate member installed?
    The youtube field accepts either video link or video id, you don’t need to use the embed code.
    The biography issue was fixed in the 1.3.88 version of the plugin, please make sure that you are using the latest version available.

    The image uploads issue may be caused by your server settings.
    Please see our doc on how to troubleshoot image uploads.

    Regards.

    Thread Starter Head Goldfish

    (@shoelaced)

    Yes I’m putting the YouTube link in the field, not the embed code. What I meant was that if I look at the code in the Chrome Inspector after I save, I can see that the video ID is not in the iframe src where it should be, which seems to be why it isn’t working.

    And yes I’m using version 1.3.88 – I’ve never used the plugin before so this version is the only one I’ve ever used. There are no update alerts in my WP dashboard.

    I’ll look into the image upload article you sent but it would certainly help if it said more than just “Error,” as I can’t tell what the problem is.

    Thread Starter Head Goldfish

    (@shoelaced)

    Okay, YouTube is still not working – I’m still getting an “Undefined Offset” error on line 1315 of ultimate-member/core/um-short-functions.php.

    I did, however, get the image upload working. The problem was that I’m using iThemes Security and I had the “Disable PHP in Plugins” option turned on. If there’s a way you can make your plugin compatible with this that’d be much appreciated, given the security risk.

    The apostrophe issue is still happening as well, and I’m most definitely running the latest version.

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @shoelaced,

    We haven’t had any reports about youtube field issue and we don’t have any on our test site.
    Can you please do a quick conflict test so we can rule out theme/plugin conflicts.
    Here is the doc on how to do a conflict test if you are not sure.
    How to do a plugin/theme conflict test?

    Regards.

    Thread Starter Head Goldfish

    (@shoelaced)

    No plugin conflicts, and not working with other themes either.

    If I echo the $url variable it prints as a whole html link… Here’s the function from the plugin — the function seems to work with just the youtube url but doesn’t work with the link format:

    https://3v4l.org/tKOvA

    I also get the “ultimate-member/core/um-short-functions.php on line 1315”-Error

    Please advise.

    For the apostrophe issue in the bio of users, I confirm this is still the case even in v 1.3.88 and is NOT fixed despite the statement of the official support. There are various reports about that in this forum. Support: can you please fix this urgently? I think it’s really a showstopper for a lot of us.

    Kind regards,

    Joris.

    Check which type of validation you have selected for the youtube video field. Firstly I have the type “website url” and the url sent to the function um_youtube_id_from_url($url) for getting video id wasn`t pure web url, it contains html tags.
    So, I created action for custom field validation and put it in function.php:

    add_action('um_submit_form_errors_hook_','um_custom_validate_youtube_url', 998, 1);
    function um_custom_validate_youtube_url( $args ) {
    	global $ultimatemember;
    	$pattern = '/^(http(s)?:\/\/)?((w){3}.)?youtu(be|.be)?(\.com)?\/.+/';
    	$result = preg_match($pattern, $args[video], $matches);
      	if (!$result) {
    		$ultimatemember->form->add_error( 'video', 'This text is not relate to youtube url.' );
    	}
    }
    

    Dear Support,

    Do you already have a solution for this error?:

    Notice: Undefined offset: 1 in ../wp-content/plugins/ultimate-member/core/um-short-functions.php on line 1315

    The error is somehow related to the standard Youtube-Video field:

    
    ***	@Get youtube video ID from url
    	***/
    	function um_youtube_id_from_url($url) {
    		$pattern =
    			'%^# Match any youtube URL
    			(?:https?://)?  # Optional scheme. Either http or https
    			(?:www\.)?      # Optional www subdomain
    			(?:             # Group host alternatives
    			  youtu\.be/    # Either youtu.be,
    			| youtube\.com  # or youtube.com
    			  (?:           # Group path alternatives
    				/embed/     # Either /embed/
    			  | /v/         # or /v/
    			  | /watch\?v=  # or /watch\?v=
    			  )             # End path alternatives.
    			)               # End host alternatives.
    			([\w-]{10,12})  # Allow 10-12 for 11 char youtube id.
    			$%x'
    			;
    		$result = preg_match($pattern, $url, $matches);
    		if (false !== $result) {
    			return $matches[1];
    		}
    		return false;
    	}
    
    	/***
    

    Line 1315 says: return $matches[1];

    I tried all kind of different validation methods, but it doesn’t help.

    Please advise.

    • This reply was modified 7 years, 4 months ago by mat4.
    • This reply was modified 7 years, 4 months ago by vfree.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Bug after bug….’ is closed to new replies.