Having checked the error log I get:
[02-Feb-2020 04:24:21 UTC] PHP Warning: urldecode() expects parameter 1 to be string, array given in /home/xxxxx/public_html/wp-includes/class-wp-query.php on line 2203
[02-Feb-2020 04:24:21 UTC] PHP Warning: preg_match() expects parameter 2 to be string, array given in /home/xxxxx/public_html/wp-includes/canonical.php on line 231
Can anyone help me? I haven’t a clue what’s happened – I’ve not changed anything…
]]>Is there a way to include link checking for Urlendcode links?
Visual Composer / Wp Bakery is a very reputable and widely used plugin and theme add-on. It seems the elements they use for creating buttons encodes the links using Urlencode.
This means that the broken link checker does not pick this up as a link and therefore does not check if they are broken. Do you guys have an option or process to resolve/work around this?
Many thanks in advance & kind regards,
Chris
Can the plugin work with a non latin custom post type rewrite slug like the one here https://prntscr.com/hvl8tw (using the CPT UI plugin for defining custom post types and taxonomies in this example)?
If I enter a non latin rewrite slug there, then the link for each single post of that post type gives a 404 page. Usually non latin characters in urls need to be urlencoded and urldecoded at some point, as fas as I can tell.
Cheers,
Takis
Warning: urldecode() expects parameter 1 to be string, array given in
/home1/…./wp-includes/query.php on line 2634
When I checked query.php, this is what is listed on line 2634:
$q[‘orderby’] = urldecode($q[‘orderby’]);
Not sure how to fix this… any feedback would be greatly appreciated.
Thanks,
Gordon
https://www.ads-software.com/plugins/post-types-order/
]]>here is my code.
$jobs_args = array( 'post_type' => 'job',
'posts_per_page' => 10,
'paged' => $job_paged,
'author' => array ( '6' ,'10'),
'post_status' => array( 'publish', 'pending', 'draft' ),
);
$jobs = new WP_Query( $jobs_args );
it is giving me warning like this “Warning: urldecode() expects parameter 1 to be string, array given in E:\Project\JobPortal\wordpress\wp-includes\query.php on line 2756
Call Stack”
also i checked the query is it coming like this
"ELECT SQL_CALC_FOUND_ROWS wpjb_posts.ID FROM wpjb_posts WHERE 1=1 AND wpjb_posts.post_author NOT IN (0) AND wpjb_posts.post_type = 'job' AND ((wpjb_posts.post_status = 'publish' OR wpjb_posts.post_status = 'draft' OR wpjb_posts.post_status = 'pending')) ORDER BY wpjb_posts.post_date DESC LIMIT 0, 10"
can any one help me.. i am but confused..
]]>I have the following issue with a blog which uses cyrillic (which is probably also an issue for all non ASCII languages):
The temporary and manually generated permalinks can be very short compared to the ones generated in English because the characters in cyrillic are urlencoded before showing/saving. In this way the data shown in the temporary permalink location and then saved to the database is not for example ‘видео'(‘video’ in English) but ‘%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE’ which is very bad for the slug length. In this way I can never put a whole title in the permalink, because it becomes very long. I was searching for a way to hook a filter to urldecode the slug in the process of generation and then place it in the temporary permalink and the database but I couldn’t find one. I think, in the best case, the same function should work for all slugs i.e. terms, options, etc. Can you suggest a solution?
Thanks.
]]>Field Name: categoria
Field Type: Taxonomy
Taxonomy: Categories
Required: No
Field Type: Multiple Values > Checkbox
Allow Null: No
Load value based on the post’s terms and update the post’s terms on save: Off
Return Value: Term ID
The code I’m using to do the query is as following:
<?php $cat = get_field('categoria'); $args = array( 'numberposts' => 5, 'category' => $cat); $postslist = get_posts($args);
foreach ($postslist as $post) : setup_postdata($post); ?>
<div>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<span><?php the_time('d/m/y'); ?> | <?php the_category(', ') ?> </span>
</div>
<?php endforeach; ?>
It works “fine” if there are no categories selected, but if one or more categories are selected then the following error shows up:
Warning: urldecode() expects parameter 1 to be string, array given in …/wp-includes/query.php on line 1735
Line 1735 is: $q['cat'] = ''.urldecode($q['cat']).'';
… inside this if conditional:
// Category stuff
if ( !empty($q['cat']) && '0' != $q['cat'] && !$this->is_singular && $this->query_vars_changed ) {
$q['cat'] = ''.urldecode($q['cat']).'';
$q['cat'] = addslashes_gpc($q['cat']);
$cat_array = preg_split('/[,\s]+/', $q['cat']);
$q['cat'] = '';
$req_cats = array();
foreach ( (array) $cat_array as $cat ) {
$cat = intval($cat);
$req_cats[] = $cat;
$in = ($cat > 0);
$cat = abs($cat);
if ( $in ) {
$q['category__in'][] = $cat;
$q['category__in'] = array_merge( $q['category__in'], get_term_children($cat, 'category') );
} else {
$q['category__not_in'][] = $cat;
$q['category__not_in'] = array_merge( $q['category__not_in'], get_term_children($cat, 'category') );
}
}
$q['cat'] = implode(',', $req_cats);
}
Any help would very much appreciated!
https://www.ads-software.com/extend/plugins/advanced-custom-fields/
]]>I got the posting down, but am having a problem trying to populate my form to let them edit their posts. When they want to edit the post, I pull the content from get_post and send it to the form they used when creating the post. I am doing this by passing the content as a standard HTTP post. I urlencode it first, since the post content appears to have line feeds, and then populate the form. But I am getting all sorts of encoded char. Like ‘\’ is front of commas, and <br \> tags within the multi line edit box.
I tried to urldecode the strings when they came in but that didn’t do anything.
How can I get rid of these before populating the form or is there a better way?
Thanks.
]]>I’m working on a project that uses an iframe to serve up a widget that collects some info from a wp blog. It collects things like the_permalink, the_title, the_excerpt, etc.
The problem that I’m having is when a single quote/apostrophe is used inside the title or the post. I’m pretty positive that WP is garbling up the quotes, because they render correctly in the blogger engine.
It looks something like this:
<iframe><iframe style="width:Xpx;height:Xpx;" frameborder="0" src="https://www.xxxx.com/widget.php&pU=<?php the_permalink()?>&pT=<![CDATA[<?php the_title()?>]]>&"></iframe>
On the recipient side, I’m processing and dealing with the pU & pT.
Here’s what I’m seeing.
test’
I think the %e2%80%99 is the culprit, which is why it renders as test?
Does anyone have any idea what I should do to render the quotes correctly? I’ve been spinning my wheels for days.
]]>