Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter Deryll

    (@padreed123)

    Thread Starter Deryll

    (@padreed123)

    Yes that should should work. Is it possible to edit the message given to users? As a suggestion, it would be even better if it would redirect to a fancy error page, like a static HTML that can be edited to a user’s liking.

    Thread Starter Deryll

    (@padreed123)

    Thx for the info @buzztone – I am still having the issue. It must have something to do with the Verve themes mobile settings because when I switch to twenty nineteen and test it in mobile mode or from a mobile device it works fine.

    According to this link below it possibly has something to do with not loading some javascript in the footer or the new reCaptcha v3 is just flagging mobile mode as “spammy behavior.”

    https://contactform7.com/2018/12/18/contact-form-7-511/#more-30175

    Thread Starter Deryll

    (@padreed123)

    Thank you for your very informative reply!

    I have since updated CF7 to version 5.1.1 and it has definitely worked for cutting out the spam so I am back to being a happy camper with CF7. The bug was stated in the Changelog so they must of not implimented reCaptcha version 3 correctly in CF7 5.1.

    I agree with your recommendation of using v3 from now on since v2 will become unsupported at some point. Thx again!

    I can agree that the banner is extremely intrusive. I like the CSS/JS fix mentioned above but I am contemplating just downgrading back to CF7 5.0.5 and v2 Captcha or using an alternative. I don’t really get the concept of tracking spammers behavior on every page. It almost seems that Google is attempting to collect more analytics data from those who don’t use their analytics services.

    Either way this is causing us a ton of extra work for something that worked 100% fine to begin with. Especially those of us with several WP sites and clients.

    IF IT AINT BROKE DON’T FIX IT!

    Thread Starter Deryll

    (@padreed123)

    Correction:
    I just realized that there was a typo above and this forum doesn’t allow edits after a few hours.

    The correct option_name is wp_user_roles not wp_user_role.

    option_name
    wp_user_roles

    option_value
    a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:61:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:11:"update_core";b:1;s:10:"list_users";b:1;s:12:"remove_users";b:1;s:13:"promote_users";b:1;s:18:"edit_theme_options";b:1;s:13:"delete_themes";b:1;s:6:"export";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:34:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:10:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}

    More info: https://www.sitepoint.com/mastering-wordpress-roles-and-capabilities/

    • This reply was modified 6 years ago by Deryll.
    Thread Starter Deryll

    (@padreed123)

    Ok after countless hours of examining wp_options tables in phpmyadmin I finally discovered the problem. Somehow the wp_user_role row got deleted. It can also happen if it is edited/changed by a plugin such as WooCommerce.

    So to fix it I copied the following from a fresh install and inserted it into the wp_options table with phpmyadmin:
    Remember to replace ‘wp_’ with your db prefix.

    option_name
    wp_user_role

    option_value
    a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:61:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:11:"update_core";b:1;s:10:"list_users";b:1;s:12:"remove_users";b:1;s:13:"promote_users";b:1;s:18:"edit_theme_options";b:1;s:13:"delete_themes";b:1;s:6:"export";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:34:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:10:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}

    Thread Starter Deryll

    (@padreed123)

    Unfortunately I don’t have a db backup before the issue occurred. The backup db I am using tables from for testing is from a clean/fresh install.

    I’ve enabled debugging and don’t get any errors.

    It must be something to do with the options table since it works when I replace that table with a “fresh” one.

    Thx!

    Thread Starter Deryll

    (@padreed123)

    The plugin has been recently updated.

    Thread Starter Deryll

    (@padreed123)

    Hopefully they update the plugin soon.. and if they do remember that it’ll wipe out the caching option from above unless they adopt it.

    Thread Starter Deryll

    (@padreed123)

    To fix the twitter avatars:

    Open “\wp-content\plugins\nextend-twitter-connect\nextend-twitter-connect.php”

    Replace
    update_user_meta($ID, 'twitter_profile_picture', 'https://api.twitter.com/1.1/users/profile_image?user_id=' . $resp->id . '&size=bigger');

    with
    update_user_meta($ID, 'twitter_profile_picture', $resp->profile_image_url );

    or if you want to cache the images instead of just linking from twitter then do this instead:

    Replace
    update_user_meta($ID, 'twitter_profile_picture', 'https://api.twitter.com/1.1/users/profile_image?user_id=' . $resp->id . '&size=bigger');

    With

    //cache profile imgs
    		  $uploads = wp_upload_dir();
    		  $upbase = $uploads['basedir'].'/';
    		  $upurl = $uploads['url'].'/';
    
                      //u can use any folder structure u'd like by changing this array.
                      //the files will be downloaded in your wp uploads folder
    
    		  $structure_arr = array('user','img','tw');
    
    		  $structure = '';
    		  foreach($structure_arr as $folder){
    			$structure .=  $folder . '/' ;
    			}
    		  $img_dir = $upbase.$structure;
    		  If(!file_exists($img_dir)) {
    			foreach($structure_arr as $folder){
    					$dir = $upbase .$folder . '/';
    					If(!file_exists($dir)){
    						mkdir($dir);
    						$upbase = $dir;
    					}
    			}
    		 }
    		 $tw_img = str_replace('_normal','',$resp->profile_image_url);
    		 $spt_tw_img = explode('.',$tw_img);
    		 $tw_ext ='.' . end($spt_tw_img);
    		 $file_name = $img_dir.$ID.$tw_ext;
    		 $get_tw_img = file_get_contents($tw_img);
    		  file_put_contents($file_name,$get_tw_img);
    		  update_user_meta($ID, 'twitter_profile_picture',  $upurl . $structure.$ID.$tw_ext);

    Thread Starter Deryll

    (@padreed123)

    Here’s the issue.. https://github.com/themattharris/tmhOAuth/issues/137

    To Fix it follow these steps:

    1. Download & unzip the latest tmhOauth
    https://github.com/themattharris/tmhOAuth/archive/master.zip

    2. Replace the old tmhOauth file located in
    “\wp-content\plugins\nextend-twitter-connect\sdk”
    with the newer version.

    3. Open “\wp-content\plugins\nextend-twitter-connect\nextend-twitter-connect.php” and replace
    $tmhOAuth->url('1/account/verify_credentials')
    to
    $tmhOAuth->url('1.1/account/verify_credentials')
    on lines 143 & 145

    That should do it.

    I’m trying to fix the same issue n the solution above didn’t work for me.. I did a lil debugging and $user_login_n_suffix and $twc_user_login_suffix are both empty. I am self hosting the app vso should I update any of the other files?

    Thread Starter Deryll

    (@padreed123)

    Thats what I was worried about.. So much for being a lazy programmer. :'(

    Forum: Plugins
    In reply to: Dynamic Post Category Menu
    Thread Starter Deryll

    (@padreed123)

    Here what I found that works. You have to create a menu walker.

    add this to your themes functions.php:

    add_action('wp_loaded','register_nav_menu_class');
    
    function register_nav_menu_class(){
    
    	class Custom_Walker_Nav_Menu extends Walker_Nav_Menu  {
    
    	    function start_el(&$output, $item, $depth, $args) {
    
    		global $wp_query;
    
    		$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
    
    		$class_names = $value = '';
    
    		$classes = empty( $item->classes ) ? array() : (array) $item->classes;
    
    		$classes[] = 'menu-item-' . $item->ID;
    
    		$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
    
    		$class_names = ' class="' . esc_attr( $class_names ) . '"';
    
    		$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
    
    		$id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : '';
    
    		$output .= $indent . '<li' . $id . $value . $class_names .'>';
    
    		$attributes  = ! empty( $item->attr_title ) ? ' title="'  . esc_attr( $item->attr_title ) .'"' : '';
    
    		$attributes .= ! empty( $item->target )     ? ' target="' . esc_attr( $item->target     ) .'"' : '';
    
    		$attributes .= ! empty( $item->xfn )        ? ' rel="'    . esc_attr( $item->xfn        ) .'"' : '';
    
    		$attributes .= ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';
    
    		$item_output = $args->before;
    
    		$item_output .= '<a'. $attributes .'>';
    
    		$item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
    
    		$item_output .= '</a>';
    
    	    if($item->object == 'category'){  	
    
    			$child_cats = wp_list_categories('title_li=&echo=0&child_of='.$item->object_id);
    
    			if( $child_cats ){
    
    				$item_output .= '<ul class="sub-menu">' .$child_cats. '</ul>';;		
    
    			}			
    
    		}
    
    		$item_output .= $args->after;
    
    		$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
    
    	    }
    
    	}
    
    }

    Then add this to your themes header.php:

    <?php
     			wp_nav_menu(array(
    	 			'container' => '',
    	 			'container_class' => '',
    	 			'menu_class' => 'dropdown',
    	 			'menu_id' => 'nav',
    	 			'sort_column' => 'menu_order',
    	 			'theme_location' => 'primary',
    				'walker' => new Custom_Walker_Nav_Menu()
    	 			));
    ?>

    *Reference: https://wpquestions.com/question/show/id/1480

Viewing 15 replies - 1 through 15 (of 18 total)