quickdry
Forum Replies Created
-
thanks for the reply, it came in while I was replying above. Yes, it is PHP 7.4 and switching to v 8.1 seems to have fixed the problem. Thanks.
I couldn’t see any PHP version requirement changes (the plugin page says 7.3 – might be worth adding a note to it. I’m not sure if what I posted might help for building in some error checking. It’s an awesome plugin, I really appreciate it.
I found what seems to be the issue in the plugin output, it is odd data in the post_grid_meta_options value stored.
In a ‘healthy’ old grid, an example value is:
a:37:{s:11:"current_tab";s:7:"layouts";s:9:"grid_type";s:4:"grid";s:16:"lazy_load_enable";s:3:"yes";s:19:"lazy_load_image_src";s:93:"https://site_name_removed.com/wp-content/plugins/post-grid/assets/admin/gif/ajax-loader-1.gif";s:18:"lazy_load_alt_text";s:0:"";s:16:"load_fontawesome";s:2:"no";s:9:"container";a:3:{s:7:"padding";s:4:"10px";s:8:"bg_color";s:0:"";s:8:"bg_image";s:0:"";}s:13:"items_wrapper";a:1:{s:10:"text_align";s:6:"center";}s:10:"post_types";a:1:{i:0;s:4:"post";}s:10:"taxonomies";a:3:{s:8:"category";a:3:{s:7:"checked";s:8:"category";s:5:"terms";a:1:{i:0;s:3:"478";}s:14:"terms_relation";s:2:"IN";}s:8:"post_tag";a:3:{s:7:"checked";s:8:"post_tag";s:5:"terms";a:1:{i:0;s:2:"19";}s:14:"terms_relation";s:2:"IN";}s:11:"post_format";a:1:{s:14:"terms_relation";s:2:"IN";}}s:19:"categories_relation";s:3:"AND";s:11:"post_status";a:1:{i:0;s:7:"publish";}s:11:"query_order";s:3:"ASC";s:13:"query_orderby";a:1:{i:0;s:5:"title";}s:22:"query_orderby_meta_key";s:0:"";s:14:"posts_per_page";s:2:"-1";s:6:"offset";s:0:"";s:12:"ignore_paged";s:2:"no";s:15:"exclude_post_id";s:0:"";s:15:"include_post_id";s:0:"";s:7:"keyword";s:0:"";s:12:"no_post_text";s:0:"";s:5:"width";a:3:{s:7:"desktop";s:5:"200px";s:6:"tablet";s:5:"200px";s:6:"mobile";s:3:"90%";}s:9:"layout_id";s:4:"9409";s:11:"item_height";a:6:{s:5:"style";s:11:"auto_height";s:12:"fixed_height";s:5:"220px";s:12:"style_tablet";s:11:"auto_height";s:19:"fixed_height_tablet";s:5:"220px";s:12:"style_mobile";s:11:"auto_height";s:19:"fixed_height_mobile";s:5:"220px";}s:19:"items_bg_color_type";s:5:"fixed";s:14:"items_bg_color";s:4:"#fff";s:6:"margin";s:4:"10px";s:12:"item_padding";s:3:"0px";s:9:"justified";a:3:{s:7:"columns";a:3:{s:7:"desktop";s:1:"3";s:6:"tablet";s:1:"2";s:6:"mobile";s:1:"1";}s:6:"gutter";s:2:"20";s:9:"maxHeight";s:3:"180";}s:7:"masonry";a:2:{s:7:"columns";a:3:{s:7:"desktop";s:1:"3";s:6:"tablet";s:1:"2";s:6:"mobile";s:1:"1";}s:6:"gutter";s:2:"20";}s:5:"tiles";a:2:{s:7:"columns";a:3:{s:7:"desktop";s:1:"3";s:6:"tablet";s:1:"2";s:6:"mobile";s:1:"1";}s:6:"gutter";s:2:"20";}s:10:"nav_bottom";a:1:{s:15:"pagination_type";s:4:"none";}s:10:"pagination";a:7:{s:13:"max_num_pages";s:1:"0";s:9:"prev_text";s:11:"? Previous";s:9:"next_text";s:7:"Next ?";s:9:"font_size";s:4:"16px";s:10:"font_color";s:4:"#fff";s:8:"bg_color";s:7:"#646464";s:15:"active_bg_color";s:7:"#4b4b4b";}s:9:"custom_js";s:0:"";s:10:"custom_css";s:0:"";s:7:"nav_top";a:7:{s:11:"action_type";s:4:"ajax";s:6:"search";s:2:"no";s:18:"search_placeholder";s:12:"Start typing";s:11:"search_icon";s:29:"<i class="fas fa-search"></i>";s:19:"search_loading_icon";s:38:"<i class="fas fa-spinner fa-spin"></i>";s:11:"query_order";s:4:"DESC";s:13:"query_orderby";a:1:{i:0;s:4:"date";}}}
But in a broken output that I’m getting recently, the value stored in post_griod_meta_options is:
a:37:{s:11:"current_tab";s:10:"query_post";s:9:"grid_type";s:4:"grid";s:16:"lazy_load_enable";s:3:"yes";s:19:"lazy_load_image_src";s:93:"https://site_name_removed.com/wp-content/plugins/post-grid/assets/admin/gif/ajax-loader-1.gif";s:18:"lazy_load_alt_text";s:0:"";s:16:"load_fontawesome";s:2:"no";s:9:"container";a:3:{s:7:"padding";s:4:"10px";s:8:"bg_color";s:0:"";s:8:"bg_image";s:0:"";}s:13:"items_wrapper";a:1:{s:10:"text_align";s:6:"center";}s:10:"post_types";a:1:{i:0;s:11:"https://post";}s:10:"taxonomies";a:3:{s:8:"category";a:3:{s:7:"checked";s:8:"category";s:5:"terms";a:1:{i:0;s:10:"https://461";}s:14:"terms_relation";s:2:"IN";}s:8:"post_tag";a:3:{s:7:"checked";s:8:"post_tag";s:5:"terms";a:1:{i:0;s:9:"https://19";}s:14:"terms_relation";s:2:"IN";}s:11:"post_format";a:1:{s:14:"terms_relation";s:2:"IN";}}s:19:"categories_relation";s:3:"AND";s:11:"post_status";a:1:{i:0;s:14:"https://publish";}s:11:"query_order";s:3:"ASC";s:13:"query_orderby";a:1:{i:0;s:12:"https://title";}s:22:"query_orderby_meta_key";s:0:"";s:14:"posts_per_page";s:2:"-1";s:6:"offset";s:0:"";s:12:"ignore_paged";s:2:"no";s:15:"exclude_post_id";s:0:"";s:15:"include_post_id";s:0:"";s:7:"keyword";s:0:"";s:12:"no_post_text";s:0:"";s:5:"width";a:3:{s:7:"desktop";s:5:"200px";s:6:"tablet";s:5:"200px";s:6:"mobile";s:3:"90%";}s:9:"layout_id";s:4:"9409";s:11:"item_height";a:6:{s:5:"style";s:11:"auto_height";s:12:"fixed_height";s:5:"220px";s:12:"style_tablet";s:11:"auto_height";s:19:"fixed_height_tablet";s:5:"220px";s:12:"style_mobile";s:11:"auto_height";s:19:"fixed_height_mobile";s:5:"220px";}s:19:"items_bg_color_type";s:5:"fixed";s:14:"items_bg_color";s:4:"#fff";s:6:"margin";s:4:"10px";s:12:"item_padding";s:3:"0px";s:9:"justified";a:3:{s:7:"columns";a:3:{s:7:"desktop";s:1:"3";s:6:"tablet";s:1:"2";s:6:"mobile";s:1:"1";}s:6:"gutter";s:2:"20";s:9:"maxHeight";s:3:"180";}s:7:"masonry";a:2:{s:7:"columns";a:3:{s:7:"desktop";s:1:"3";s:6:"tablet";s:1:"2";s:6:"mobile";s:1:"1";}s:6:"gutter";s:2:"20";}s:5:"tiles";a:2:{s:7:"columns";a:3:{s:7:"desktop";s:1:"3";s:6:"tablet";s:1:"2";s:6:"mobile";s:1:"1";}s:6:"gutter";s:2:"20";}s:10:"nav_bottom";a:1:{s:15:"pagination_type";s:4:"none";}s:10:"pagination";a:7:{s:13:"max_num_pages";s:1:"0";s:9:"prev_text";s:11:"? Previous";s:9:"next_text";s:7:"Next ?";s:9:"font_size";s:4:"16px";s:10:"font_color";s:4:"#fff";s:8:"bg_color";s:7:"#646464";s:15:"active_bg_color";s:7:"#4b4b4b";}s:9:"custom_js";s:0:"";s:10:"custom_css";s:0:"";s:7:"nav_top";a:7:{s:11:"action_type";s:4:"ajax";s:6:"search";s:2:"no";s:18:"search_placeholder";s:12:"Start typing";s:11:"search_icon";s:29:"<i class="fas fa-search"></i>";s:19:"search_loading_icon";s:38:"<i class="fas fa-spinner fa-spin"></i>";s:11:"query_order";s:4:"DESC";s:13:"query_orderby";a:1:{i:0;s:11:"https://date";}}}
The only differences in these grid definitions should be the “term” 478 in the first, 461 in the second. But you can see lots of “https://” added in values, e.g. instead of term 461, it has https://461, it is most easiest to see on the query_order_by (last value in both) being “date” in the working grid, and “https://date” in the second.
If I go into MySQL and manually remove those erroneous “https://” from the value, then everything works. But the next grid I define does the same thing, whether a new grid, or a duplicated grid from a working grid. The issue crops up when using the save/update. Have tested on safari, chrome, firefox in case of suden browser weirdness.
Is there some weird escaping going on? it is in all user selected values e.g. post_type, category, terms, post_status, query_orderby
It doesn’t really mess up my layouts, but in the old layouts “Post Date” was not a link, but now when an old layout is used, it shows that date as a permalink to the post.
It’s a similar issue to the “read more”, options that didn’t exist on old layouts are assumed to be turned on in the new layouts – it works with the data of a new layout, but not on an old)
That one isn’t a showstopper for me and I’m sleepy so I didn’t dig into it – but at line 1087 you set the “link_to” value. By default/on old layouts, that is set to “post_link”. Is there a value/way of telling that a layout is an “old layout”? Then you could just do something like:
if ($old_layout){ $link_to = 'Nothing'; } //now Post Date won't set itself as a link.
it looks like a copy paste of some old code – cause in line 428 you’d commented out the very bit of code that grabs the excerpt, and have post_content instead.
this is what the function should look like and seems to be working (it immediately fixes the excerpt vs post content issue.)
function post_grid_layout_element_excerpt($args){ $element = isset($args['element']) ? $args['element'] : array(); $elementIndex = isset($args['index']) ? $args['index'] : ''; $post_id = isset($args['post_id']) ? $args['post_id'] : ''; if(empty($post_id)) return; $layout_id = isset($args['layout_id']) ? $args['layout_id'] : ''; $the_post = get_post($post_id); $post_excerpt = get_the_excerpt($post_id); $post_link = get_permalink($post_id); $link_target = isset($element['link_target']) ? $element['link_target'] : ''; $custom_class = isset($element['custom_class']) ? $element['custom_class'] : ''; $char_limit = !empty($element['char_limit']) ? (int) $element['char_limit'] : 50; $read_more_text = isset($element['read_more_text']) ? $element['read_more_text'] : ''; if($char_limit > 0){ $post_excerpt = wp_trim_words($post_content, $char_limit, ''); } ?> <div class="element element_<?php echo esc_attr($elementIndex); ?> <?php echo esc_attr($custom_class); ?> excerpt "> <?php echo ($post_excerpt); ?> <?php if(!empty($read_more_text)): ?> <a target="<?php echo esc_attr($link_target); ?>" href="<?php echo esc_url_raw($post_link); ?>"><?php echo esc_html($read_more_text); ?></a> <?php endif; ?> </div> <?php }
that one is worse – it may not show “read more”, but now it is including the first paragraph of text from the post instead of the “excerpt” field which is defined in the layout (it even obeys the word limit’s defined in the template, but applies that limit to the post’s text )
Hi, will this fix (or another fix) be in a patch release soon?
(it feels a little like shouting into the wind despite offering a fix to the bug)
Forum: Plugins
In reply to: [Simple Membership] login/logoutcreate a link with the address like:
You can set the password as a define in your wp config file.
That’s probably the better route unless you need it in the database anyway.
no, it replaces the wp_mail() function with a better/alternate mail sending mechanism.
This is a mail queue plugin that might work for you https://www.ads-software.com/plugins/gd-mail-queue/