Andry
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: problems with database Full updateDuring testing, I realized that the browser does not allow to write >415kB to the database (Chrome or FF makes no difference) It’s browser problem.
You can check it if you interrupt operations when accessing the file `wp-admin/admin-ajax.php’
Forum: Developing with WordPress
In reply to: How work JSON_TABLE for WP ?If the code worked, I would not create a question here =)
https://dbfiddle.uk/btZu0Bwh It’s all what I can to show.Forum: Developing with WordPress
In reply to: problems with database Full updateMy js code look like
async function getData() { let response = await fetch('https://api1.test.com/'); if (!response.ok) { const message = <code>An error has occured: ${response.status}</code>; throw new Error(message); } let result = response.json(); return await result } $('#btn_update').click(function(){ getData().then((data) => { const sportsJsonString = JSON.stringify(data, null, "\t"); console.log("sportsJsonString", sportsJsonString); fetch(ajaxurl, { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: <code>action=updateDB&text=${sportsJsonString}</code> }) .then((data) =>{ $('#btn_update').text('Повторно обновить'); }) .catch(err => console.error(err)); }) });
Why strange for you, that variable type of ‘sportsJsonString’ – string? If I push ‘data’ variable into table cell, I got
[object Object]
in thisjson
cell.- This reply was modified 2 years, 4 months ago by Andry.
Forum: Developing with WordPress
In reply to: problems with database Full updateI see request https://joxi.ru/Rmzy38McV9ZzXr
But when I show result AJAX in console I got –> https://joxi.ru/VrwxZ1JcgldQjmForum: Developing with WordPress
In reply to: problems with database Full updateOn the html page, when I started AJAX request pushing on a button I see nothing changes;
function updateDataBase(){ global $wpdb; $table_name = $wpdb->get_blog_prefix() . 'sports_viewer'; var_dump($_POST . ' dick'); print_r($_POST); wp_die(); }
NO array.
Forum: Developing with WordPress
In reply to: problems with database Full updateI see Headers parameter
Content-Length: 2059630
in Chrome DevTools, butvar_dump($_POST);
show me nothing in php functionForum: Developing with WordPress
In reply to: do_shortcode does not workSometime i have the same problem when use shortcode in seo text.
<?php echo do_shortcode(get_the_content()); ?>
It helped meForum: Plugins
In reply to: [Polylang] Broken translated pagesYou can fix you problem using CSS ruls for your language.
For examplebody:lang(de-DE) { background: red; }
It’s not a plugin problem.
Forum: Plugins
In reply to: [Polylang] x-default hreflang last element of attributes listI found answer
////// x-default hreflang function polylang_add_xdefault( $hreflangs ) { $default = array( 'x-default' => reset( $hreflangs ) // Fetch the first language URL in the list as x-default ); return $hreflangs = $hreflangs + $default; } add_filter( 'pll_rel_hreflang_attributes', 'polylang_add_xdefault', 10, 1 );
We can close this question.
Forum: Plugins
In reply to: [AMP] Creating wrong links for custom taxonomyThanks, it fixed problem
Forum: Plugins
In reply to: [AMP] Short URL with PolylangThanks again
Forum: Plugins
In reply to: [AMP] Short URL with PolylangThanks for help
Forum: Plugins
In reply to: [AMP] Multilang site with AMP pagesoh, I found answer here https://www.ads-software.com/support/topic/polylang-and-amp-homepage-problem/
Forum: Plugins
In reply to: [AMP] Incorrect tag img in AMPYes, thanks It’s work
Forum: Plugins
In reply to: [AMP] Incorrect tag img in AMPI don’t understand either.
I also try variants withhtml[amp] .bahsegel_homeBonus__center .i-amphtml-intrinsic-sizer { max-width: initial; } .bahsegel_homeBonus__center .i-amphtml-intrinsic-sizer { max-width: initial; }
but it didn’t work too. Without plugin css looks OK. *Site don’t have Cache-plugin.
- This reply was modified 2 years, 11 months ago by Andry.