Trouble accessing values in an array of an array - php

I have a variable called $graph that carries OpenGraph data scraped from a URL. When I print_r the variable, this is what it looks like:
Array (
[OpenGraph_values] => Array (
[url] => http://www.theguardian.com/sport/blog/2017/jun/05/lebron-james-cleveland-cavaliers-nba-finals
[description] => The Cleveland star’s greatness created an arms race in basketball, and it has reached its apotheosis in the Golden State Warriors
[image] => https://i.guim.co.uk/img/media/3746052fc5b7f0a1ffb9ee2d5cd79585c31149a8/562_880_4049_2429/master/4049.jpg?w=1200&h=630&q=55&auto=format&usm=12&fit=crop&crop=faces%2Centropy&bm=normal&ba=bottom%2Cleft&blend64=aHR0cHM6Ly91cGxvYWRzLmd1aW0uY28udWsvMjAxNi8wNS8yNS9vdmVybGF5LWxvZ28tMTIwMC05MF9vcHQucG5n&s=71512608e33d4fda4fcf6ca52ccbd2bf
[type] => article
[title] => LeBron James created the modern NBA superteam. Now it will destroy him
[site_name] => the Guardian
)
[OpenGraph_position] => 0
)
I cannot for the life of me figure out how to access the data in there. I've tried $graph['image'] and $graph['OpenGraph_values']['image'], but no luck. Both come out null. There has to be something really simple that I'm missing, but I'm pretty new to PHP so I don't even know how to search for my problem.
EDIT: Some additional information:
I'm creating the variable by doing this:
$graph = (array)OpenGraph::fetch( $permalink );
where $permalink is a string with a URL.
Which uses this tool to fetch the OpenGraph data: https://github.com/scottmac/opengraph
Let me know if anything else in particular might be useful. This is running in a WordPress site, if that's relevant at all.

Related

How can I echo a single element of this object?

I'm trying to use this php library along with Sheetsu to pull single bits of data from a Google spreadsheet for output on a web page. My php skills are minimal and spotty, I'm afraid, and so I'm missing a final crucial component.
When I set up a test file and run my query, the code dumps everything into a $collection object. If I output print_r($collection); I get this:
Sheetsu\Collection Object (
[models:Sheetsu\Collection:private] => Array (
[0] => Sheetsu\Model Object (
[id] => 2.05.1
[title] => The Mead of Poetry
[answer] => Kvasir was created from the spit of the Aesir and Vanir. He was very wise.
)
)
)
My data's there, everything's working as expected, but I've never seen a structure like that before.
How can I just echo, say, just the [answer] value? I'm not sure what syntax to use to drill into that.
Thanks!
try
$collection->get(0)
or
$collection->getFirst()
or
$collection->getAll()[0]
etc.
models is a private property, you can't access it directly
so to access answer it would be something like
$collection->get(0)->answer
Try echo $collection[0]->answer;

How to get the name of Telegram bot with PHP

I'm trying to make a custom management system for Telegram bots so that I can be able to send and read updates easily.. But my main problem is that I don't know how to retrieve data from an array. let me explain this in depth so you can understand what I'm talking about.
Basically when I try the getme command, I get this:
{"ok":true,"result":{"id":275700102,"first_name":"photoshop_post_production","username":"post_pro_bot"}}
So I converted this into an array using Php and it goes like this:
$_SESSION['website'] = "https://api.telegram.org/bot";
$_SESSION['url'] = "https://api.telegram.org/bot".$_SESSION['token'];
$_SESSION['me'] = file_get_contents($_SESSION['url']."/getme");
$_SESSION['meArray'] = json_decode($_SESSION['me'], TRUE);
So as you can see I have an array called meArray and if I print_r it ,this will be shown:
Array ( [ok] => 1 [result] => Array ( [id] => 275700102 [first_name] => photoshop_post_production [username] => post_pro_bot ) )
So basically I don't know how to take out the username or other information that I want from this array. I have tried several things but no success till now.
So, should be:
$_SESSION['meArray']['result']['username']
Try this.

Google Calendar API always Paginates Event List

Summary:
Google_Service_Calendar seems to be "force-paginating" results of $service->events->listEvents();
Background:
google calendar API v3,
using php client library
We are developing a mechanism to sync our internal calendar with a user's google calendar.
Please note I will refer below to $x, which represents google's default limit on the number of events, similar to $options['maxResults']; The default value is 250, but it should not matter: we have tested the below with and without explicitly defined request parameters such as 'maxResults', 'timeMin', and 'timeMax' - the problem occurs in all cases.
Another relevant test we did: export this calendar to foobar.ics, created a new gmail user form scratch, import foobar.ics to newuser#gmail.com. DOES NOT REPLICATE THIS ISSUE. We have reviewed/reset various options in the subject calendar (sharing, etc) but cannot find any setting that has any effect.
The Problem:
Normally, when we call this:
$calendar='primary';
$optParams=array();
$events = $this->service->events->listEvents($calendar, $optParams);
$events comes back as a Google_Service_Calendar_Events object, containing $n "items". IF there are more than $x items, the results could be paginated, but the vanilla response (for a 'normal', result set with ( count($items) < $x ) ) is a single object, and $events->nextPageToken should be empty.
One account we are working with (of course, the boss's personal account) does not behave this way. The result of:
$events = $this->service->events->listEvents('primary', []);
is a Google_Service_Calendar_Events object like this:
Google_Service_Calendar_Events Object
(
[accessRole] => owner
[defaultRemindersType:protected] => Google_Service_Calendar_EventReminder
[defaultRemindersDataType:protected] => array
[description] =>
[etag] => "-kakMffdIzB99fTAlD9HooLp8eo/WiDS9OZS7i25CVZYoK2ZLLwG7bM"
[itemsType:protected] => Google_Service_Calendar_Event
[itemsDataType:protected] => array
[kind] => calendar#events
[nextPageToken] => CigKGmw5dGh1Mms4aWliMDNhanRvcWFzY3Y1ZGkwGAEggICA6-L3lrgUGg0IABIAGLig_Zfi278C
[nextSyncToken] =>
[summary] => example#mydomain.com
[timeZone] => America/New_York
[updated] => 2014-07-23T15:38:50.195Z
[collection_key:protected] => items
[modelData:protected] => Array
(
[defaultReminders] => Array
(
[0] => Array
(
[method] => popup
[minutes] => 30
)
)
[items] => Array
(
)
)
[processed:protected] => Array
(
)
)
Notice that $event['items'] is empty, and nextPageToken is not null. If we then do a paginated request like this:
while (true) {
$pageToken = $events->getNextPageToken();
if ($pageToken) {
$optParams = array('pageToken' => $pageToken);
$events = $this->service->events->listEvents($calendar, $optParams);
if(count($events) > 0){
h2("Google Service returned total of ".count($events)." events.");
}
} else {
break;
}
}
The next result set gives us the events. In other words, the google service seems to be paginating the initial results, despite the fact that we are certain the result is less than $x.
To be clear, if we have 5 events on our calendar, we expect 1 result with 5 items. Instead, we get 1 result with 0 items, but the first result of the 'nextPageToken' logic gives us the desired 5 items.
Solution Ideas?:
A. handle paginated results, and/or "Incremental Syncronization'. These are on our list of features to implement, but we consider these to be more 'optimization' than 'necessity'. In other words, I understand that handling/sending nextSyncToken and nextPageToken are OPTIONAL- thus the issue we are having should not depend on our client code doing this.
B. use a different, non-primary calendar for this user. we think this particular primary calendar may corrupt or somehow cached on google's side: to be fair, we did at one point accidentally insert a bunch of junk events on this calendar to the point that google put us in read-only mode as described here: https://support.google.com/a/answer/2905486?hl=en but we understand that was a temporary result of clunky testing.... In other words, we know we HAD screwed this calendar up badly, but this morning we deleted ALL events, added a single test event, and got the same result as above FOR THIS CALENDAR. Cannot replicate for any other user.... including a brand new gmail user.
C. delete the 'primary' calendar, create a new one. Unfortunately, we understand it is not possible to delete the primary CALENDAR, only to delete the CALENDAR EVENTS.
D. make the boss open a brand new google account
Any other suggestions? We are proceeding with A, but even that is a band-aid to the problem, and does not answer WHY is this happening? How can we avoid it in the future? (Please don't say "D")
Thanks in advance for any advice or input!
There is a maximum page size, if you don't specify one yourself there is an implicit one (https://developers.google.com/google-apps/calendar/v3/pagination). Given this it's necessary to implement pagination for your app to work correctly.
As you noticed, a page does not always contain the maximum number of results so pagination is important even if the number of events does not exceed the page size. Just keep following the page tokens and it will eventually give you all the results (there will be a page with no nextPageToken)
TL;DR A :)

WooCommerce products showing “Out of stock” message when not actually out of stock

Having an issue with a client website where products are randomly displaying
"This product is currently out of stock and unavailable."
The thing is that we don't have inventory tracking turned on, all products should be in stock all the time.
When I go into the WordPress admin and click the update button for the product (without changing anything) and then the message goes away and the "Add to Cart" button displays as it should. Unfortunately, the issue repeats itself on these items in the future and to fix it I have to update the product again (also clicking update in the WooCommerce settings temporarily solves the problem).
I need to find a way to fix this problem permanently so it doesn't revert itself.
Site Details:
Using WordPress 3.9.1
WooCommerce 2.1.12
PHP 5.3.10 (also tried locally w/ 5.5.10)
What I've tried
Removing all plugins but WooCommerce
Changing themes (tried all standard WordPress themes and a few WooThemes themes to no avail)
Updated WooCommerce (it was v 2.1.5)
Manually inserted to wp_postmeta adding the meta key _manage_stock and set it to no (as observed in some of the working products we have)
Manually inserted to wp_postmeta adding the meta key '_stock' and set it to 0 (as observed in some of the working products we have)
Compared the postmeta of the product before and after clicking the update button to observe if anything had changed that would cause the problem...nothing
No caching is turned on
Used XDebug to track the $available_variations variable in variable.php and
class-wc-ajax.php and class-wc-product-variable.php.
When debugging I noticed that in products that were working the $available_variations variable contained 2 arrays filled with product information, however on the products that didn't, it was an empty array (which results in the out of stock message being displayed as served by variable.php). Clicking the update button and then tracking the variable shows the information correctly.
Honestly at this point I'm at a loss. I think the issue is somewhere in either of the classes, but I can't tell.
Has anyone else had issues with this? Any way around this issue so I don't have to keep updating products for this client.
Link to product that is out of stock (as of posting) http://highlandsministriesonline.org/product/basement-tapes/resentment-in-the-church-135/
Link to product that is displaying correctly http://highlandsministriesonline.org/product/basement-tapes/bt0111-church-at-corinth-i/
Error Log
I added an error log to the product variation class. Heres the result:
For products with the "out of stock" message, nothing displays in the log.
An example of a product that function correctly:
WC_Product_Variation Object
(
[variation_id] => 1310
[parent] => WC_Product_Variable Object
(
[children] => Array
(
[0] => 1311
[1] => 1310
)
[total_stock] =>
[id] => 1308
[post] => WP_Post Object
(
[ID] => 1308
[post_author] => 1
[post_date] => 2012-04-03 14:29:42
[post_date_gmt] => 2012-04-03 18:29:42
[post_content] => This audio presentation on homeschooling is a Basement Tape conversation on homeschooling.
<h2>What are The Basement Tapes?</h2>
<em>The Basement Tapes</em> are conversations between Dr. R.C. Sproul Jr., Rev. Laurence Windham, their friends and special guests, on subjects related to the “good life,” a simple, separate, and deliberate life, lived out for the glory of God and for the building of His Kingdom.
You might even say that the Basement Tapes serve to help us develop a Christian worldview. Started in 2002, we now have over #140 conversations on all areas of life that we are seeking to think biblically about so that we might take dominion over them for the King and His kingdom.
<strong>Format: Available in both CD and MP3</strong>
<strong>Length: Sixty minutes</strong>
[post_title] => Basement Tape #109: Homeschooling Redux
[post_excerpt] => It's been 108 weeks since we last talked about the subject of homeschooling our children. Our tykes have grown into teenagers. What have we learned in the past nine years? What has changed? What remains the same is that homeschooling means discipleship; passing down your most important convictions to your children and teaching them our holy religion.
[post_status] => publish
[comment_status] => open
[ping_status] => closed
[post_password] =>
[post_name] => bt0109-homeschooling-reducks
[to_ping] =>
[pinged] =>
[post_modified] => 2014-07-07 11:08:46
[post_modified_gmt] => 2014-07-07 15:08:46
[post_content_filtered] =>
[post_parent] => 0
[guid] => http://50.57.190.158/?post_type=product&p=1308
[menu_order] => 0
[post_type] => product
[post_mime_type] =>
[comment_count] => 0
[filter] => raw
)
[product_type] => variable
)
[variation_data] => Array
(
[attribute_pa_audio-options] => mp3-download
)
[variation_has_length] =>
[variation_has_width] =>
[variation_has_height] =>
[variation_has_weight] =>
[variation_has_stock] =>
[variation_has_sku] => 1
[variation_shipping_class] =>
[variation_shipping_class_id] =>
[variation_has_tax_class] =>
[variation_has_downloadable_files] => 1
[id] => 1308
[post] => WP_Post Object
(
[ID] => 1308
[post_author] => 1
[post_date] => 2012-04-03 14:29:42
[post_date_gmt] => 2012-04-03 18:29:42
[post_content] => This audio presentation on homeschooling is a Basement Tape conversation on homeschooling.
<h2>What are The Basement Tapes?</h2>
<em>The Basement Tapes</em> are conversations between Dr. R.C. Sproul Jr., Rev. Laurence Windham, their friends and special guests, on subjects related to the “good life,” a simple, separate, and deliberate life, lived out for the glory of God and for the building of His Kingdom.
You might even say that the Basement Tapes serve to help us develop a Christian worldview. Started in 2002, we now have over #140 conversations on all areas of life that we are seeking to think biblically about so that we might take dominion over them for the King and His kingdom.
<strong>Format: Available in both CD and MP3</strong>
<strong>Length: Sixty minutes</strong>
[post_title] => Basement Tape #109: Homeschooling Redux
[post_excerpt] => It's been 108 weeks since we last talked about the subject of homeschooling our children. Our tykes have grown into teenagers. What have we learned in the past nine years? What has changed? What remains the same is that homeschooling means discipleship; passing down your most important convictions to your children and teaching them our holy religion.
[post_status] => publish
[comment_status] => open
[ping_status] => closed
[post_password] =>
[post_name] => bt0109-homeschooling-reducks
[to_ping] =>
[pinged] =>
[post_modified] => 2014-07-07 11:08:46
[post_modified_gmt] => 2014-07-07 15:08:46
[post_content_filtered] =>
[post_parent] => 0
[guid] => http://50.57.190.158/?post_type=product&p=1308
[menu_order] => 0
[post_type] => product
[post_mime_type] =>
[comment_count] => 0
[filter] => raw
)
[product_type] => variation
[product_custom_fields] => Array
(
[_sku] => Array
(
[0] => BT0109MP3
)
[_price] => Array
(
[0] => 3
)
[_sale_price] => Array
(
[0] =>
)
[_weight] => Array
(
[0] =>
)
[_length] => Array
(
[0] =>
)
[_width] => Array
(
[0] =>
)
[_height] => Array
(
[0] =>
)
[_stock] => Array
(
[0] =>
)
[_thumbnail_id] => Array
(
[0] => 0
)
[_virtual] => Array
(
[0] => yes
)
[_downloadable] => Array
(
[0] => yes
)
[_download_limit] => Array
(
[0] =>
)
[_downloadable_files] => Array
(
[0] => a:1:{s:32:"a0a87d43e69ed9de646ba479c252c9fb";a:2:{s:4:"name";s:29:"109-Homeschooling-Reducks.mp3";s:4:"file";s:113:"http://highlandsministriesonline.org/wp-content/uploads/woocommerce_uploads/2012/04/109-Homeschooling-Reducks.mp3";}}
)
[_regular_price] => Array
(
[0] => 3
)
[_sale_price_dates_from] => Array
(
[0] =>
)
[_sale_price_dates_to] => Array
(
[0] =>
)
[_download_expiry] => Array
(
[0] =>
)
[attribute_pa_audio-options] => Array
(
[0] => mp3-download
)
)
[sku] => BT0109MP3
[downloadable_files] => a:1:{s:32:"a0a87d43e69ed9de646ba479c252c9fb";a:2:{s:4:"name";s:29:"109-Homeschooling-Reducks.mp3";s:4:"file";s:113:"http://highlandsministriesonline.org/wp-content/uploads/woocommerce_uploads/2012/04/109-Homeschooling-Reducks.mp3";}}
[downloadable] => yes
[virtual] => yes
[sale_price_dates_from] =>
[sale_price_dates_to] =>
[price] => 3
[regular_price] => 3
[sale_price] =>
[total_stock] => 0
[dimensions] =>
)
Potential Next Steps My next thought if I cant get this resolved is to write a script that will go through and update each product on the website on a nightly basis (since the temporary fix seems to work for at least 24 ours). Though if I can save some of my time I'd rather not if someone else has been able to solve this issue permanently.
Update as of October 23,2014
This issue is still occurring despite attempting the answers below. I have created a logging plugin to hopefully help track the frequency of the out of stock messages and hopefully help correlate the message with any actions taken place on the website. It's currently customized to this specific website, but I'm working on a version to share with you all so that even if I can't find the answer, someone can.
I had this same problem and I think I figured it out. I used the CSV Import/Export suite to export all of my variations. You'll notice that stock is set to 0 when it should have a value of null.
You have two options here:
Go into each individual product, click the variations tab and expand each variation - unchecking the "manage stock" checkbox:
You can do a find-and-replace on the database substituting the 0 value for null.
I was getting this same issue with a product I had newly created. But for me the answer was more simple.
I needed to enter in a “Regular Price” for every variation.
https://wordpress.org/support/topic/this-product-is-currently-out-of-stock-and-unavailable-4/
I had created my attributes previously.
Under Variations, for my product, I had to make sure “Add variation” was selected. Then I clicked the “Go” button.
I needed to create a variation for each of the different choices the attribute could have.
So for my Color Options I had to make three different variations (one for each choice).
Then I needed to click the blue “Expand” text, and make sure each variation had a Regular price.
Then it worked.
(This was helpful too: https://docs.woocommerce.com/document/variable-product/ )
It's 2017 and I'm still seeing the OP's exact problem on a store running:
WordPress 4.8.1
WooCommerce 3.1.2
PHP 5.6
tons of plugins and a janky theme
I don't have the time to genuinely fix the bug--whatever it is--but I made a workaround.
The problem is that $product is missing everything variation related. There are no variation IDs, attributes, or prices. My workaround fixes up $product before it gets used in the templates.
Step 1: Copy the price.php template into your theme. Navigate to your WooCommerce's price template at /wp-content/plugins/woocommerce/templates/single-product/price.php. Copy that into your theme at /wp-content/themes/my-theme/woocommerce/single-product/price.php. If you already have that file there, then you already have a custom price.php template and you can skip this step.
Documentation on how WooCommerce custom templates work: https://docs.woocommerce.com/document/template-structure/
Step 2: Edit that price.php you just put in your theme. Below global $product; paste this:
if ( $product->is_type( 'variable' ) ) {
// this is a variable product, so let's ensure $product is set up correctly
// force the product to sync with its variations
$product->sync( $product->id );
// update $product with the synced product
$pf = new WC_Product_Factory();
$product = $pf->get_product( $product->id );
// update utility variables used in the variable.php template
$available_variations = $product->get_available_variations();
$attributes = $product->get_variation_attributes();
}
I had some caching issues that made it appear as though it wasn't working at first. To test if it's working you can drop
echo '<pre style="display: none;">';
print_r( $product );
echo '</pre>';
at the top and bottom of the if. Now you can inspect the page, and just above the price will be the two hidden <pre> containing $product before and after fixing.
This works by using the sync() function to force the product to grab all the missing variation info, and then updates variables for use in templates. I believe the price is the earliest any of the variation data gets used in the templates, but this snippet could easily go higher up in the template chain if needed.
Edit: The above fix only works for WooCommerce 3.x. I did create a fix for WC 2.x but it is so huge and gross I'm not going to post it. If you still have a 2.x store you need to look into some sort of overhaul that will allow you to get on 3.x.
Edit: My problem recurred - items became outofstock again after a time. In searching around, I found that there are more entries in the wp_postmeta table to be concerned with thanks to this post. Below, I've added 2 additional update functions that should help make the fix last forever.
One cause of this problem is that the stock status may be recorded as "outofstock" in the database, even while manage inventory is disabled.
You can check if this is your problem in phpMyAdmin by running:
SELECT * FROM `wp_postmeta` WHERE `meta_key` = '_stock_status'
If you see that items are "outofstock" but are expected to be "instock," you can change them manually. Or, you can run:
UPDATE `wp_postmeta` SET `meta_value` = 'instock' WHERE `meta_key` = '_stock_status';
UPDATE `wp_postmeta` SET `meta_value` = '999999999' WHERE `meta_key` = '_stock';
UPDATE `wp_postmeta` SET `meta_value` = 'no' WHERE `meta_key` = '_manage_stock';
Try deleting the product and create a same product and try i had a same problem and it worked for me. even try re-installing the WooCommerce 2.1.12
I am experiencing the same problem and I think i've found the reason.
It's related to the sync_stock_status static function of WC_Product_Variable Class.
You can fix a variable product stock status running this in your functions.php:
add_action('wp',function(){
$productId = 639;
WC_Product_Variable::sync_stock_status(639);
});
Of course this isn't a good solution because it only fixes one product at one particular moment.
So the problem seems to be running this function at the right moment.
The interesting thing is i've seen through the code and i found out that the quick edit save calls this function and fixes the product also!
Other interesting thing is it seems that the woocommerce team may have fixed it for good, because i've found out through this commit that they are calling this function now when the product is updated.
I got the same error, and I updated max_input_vars = 30000 on php.ini and it works fine.
I'm on Siteground Shared hosting,
WordPress woocommerce based stock out product message show and change some tricky option. If you care wordpress plugin developer, you can do it override stock out hook. Also you can do it various wordpress free plugin already available in wordpress plugin directory.
You can just search google with 'Out of Stock message' or 'Stock Out message woocommerce'.
There are a awesome plugin to solve stock out message. Plugin link out of Stock message.

500 - An error has occurred – DB function reports no errors when adding new article in Joomla

I have an article that I want to publish on my Joomla! site. Every time I click apply or save. I get error 500 - An error has occurred! DB function reports no errors. I have no idea why this error comes up, al I can think is that it's a server error.
I'm using TinyMCE to type articles together with Joomla! 1.5.11.
Updated: I turned on Maximum error reporting in Joomla! and in the article manager I tried to save the article and got these couple of errors. Please check screenshot
I tried adding
<?php
ini_set('error_reporting', E_ALL);
error_reporting(E_ALL);
ini_set('log_errors',TRUE);
ini_set('html_errors',TRUE);
ini_set('display_errors',true);
?>
at the top of the index.php pages for Joomla! but it does not show any errors. I checked the error logs on the server and also no errors come up.
I managed to publish the article via phpMyAdmin but then something else happens. I try to access to article from the front end, by clicking on the link to the article, but only a blank page comes up.
This is really weird, since the error log does not show any information. So I assume the error needs to be coming from Joomla!
This happens if I add a print_r($_POST) before if (!$row->check()) { on /administrator/components/com_content/controller.php (around line 693)
Array
(
[title] => Test.
[state] => 0
[alias] => test
[frontpage] => 0
[sectionid] => 10
[catid] => 44
[details] => Array
(
[created_by] => 62
[created_by_alias] =>
[access] => 0
[created] => 2008-10-25 13:31:21
[publish_up] => 2008-10-25 13:31:21
[publish_down] => Never
)
[params] => Array
(
[show_title] =>
[link_titles] =>
[show_intro] =>
[show_section] =>
[link_section] =>
[show_category] =>
[link_category] =>
[show_vote] =>
[show_author] => 1
[show_create_date] => 0
[show_modify_date] => 0
[show_pdf_icon] =>
[show_print_icon] =>
[show_email_icon] =>
[language] =>
[keyref] =>
[readmore] =>
)
[meta] => Array
(
[description] => Test.
[keywords] => Test
[robots] =>
[author] => Test
)
[id] => 58
[cid] => Array
(
[0] => 58
)
[version] => 30
[mask] => 0
[option] => com_content
[task] => apply
[ac1e0853fb1b3f41730c0d52de89dab7] => 1
)
I had a bounty on this question, but the problem is still not resolved? link text
Any help will be appreciated!!
Here is a link to the article (text file with the source I got from TinyMCE) Article
I read this other question and saw that you can't post the article since it's confidential. Is it in "plain english", does it have html? Could you provide some more information? Joomla has some plugins that "filter" a lot of content. If you try to write "iframe" or "script" tags in Joomla TinyMCE it's going to be filtered, this is Joomla's way of providing security.
Did you try to disable TinyMCE filters? Go to "Plugin Manager", "Editor - TinyMCE 2.0" and change "Code cleanup" options to test.
Looking at your POST array, it looks like the body text of your post isn't being sent. This would suggest it's a problem on the front end. Can you check the name of the HTML element where you are typing the body text? If you could edit and show us the relevant parts of the HTML form that would help too.
edit: ok, that article you linked to is almost 150,000 bytes, so it might be that it's choking on it. If this is a once-off article that you probably won't have to edit too much, I'd recommend putting in some dummy text and then going into your database using phpMyAdmin or something and editing the text in the jos_content table. The introtext and fulltext columns are defined as MEDIUMTEXT so they should be able to hold up to about 16MB without hassle.
If writing and/or editing articles of this size is something you'll be doing often (and hence, don't want to go into the DB each time), then perhaps you'll have to look at the maximum post size allowed.
This error could occur when you use Firefox.
Try to reproduce using IE.
Regards
Simply do the following task
"""you can ask to your hosting provider to disable the function suhosin in php.ini. When this function is enable, is not possible to save large posts."""".
Shailedner Ahuja
My Web Developer
http://www.mywebdeveloper.in
Your article text is too big . The table might not be finding space to save this big . I would like suggest you to use the LONGTEXT
datatype. Check if it works for you .

Categories