Oh, got 0.44 now. The warnings are still there.
I'l try to debug this later, CeBIt keeps me busy right now.
freetag plugin generates SQL error
Re: freetag plugin generates SQL error
Finally found some time to debug this issue. I get a warning in plugins/serendipity_event_microformats/serendipity_event_microformats.php in line 137. The code is:
in function getSupportedProperties($mf_type).
Debugging shows, the $mf_type variable is not an array - it's not set at all.
The second warning is in the same file, line 251. The code is:
Same reason: the variable is not set.
Code: Select all
foreach ($mf_type as $v) {
Debugging shows, the $mf_type variable is not an array - it's not set at all.
The second warning is in the same file, line 251. The code is:
Code: Select all
foreach($supported_properties AS $prop_key => $prop_val) {
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: freetag plugin generates SQL error
Hi!
That's strange. $serendipity['POST']['properties'] should contain your microformats data.
Can you do a print_r($serendipity['POST']) on line 250, just before getSupportedProperties() is called?
Regards,
Garvin
That's strange. $serendipity['POST']['properties'] should contain your microformats data.
Can you do a print_r($serendipity['POST']) on line 250, just before getSupportedProperties() is called?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: freetag plugin generates SQL error
Sure, here we go:garvinhicking wrote:Can you do a print_r($serendipity['POST']) on line 250, just before getSupportedProperties() is called?
(token modified)Dump:
Array (
[action] => admin
[adminModule] => entries
[adminAction] => save
[id] =>
[timestamp] => 1269858844
[preview] => true
[token] => 148020e434a42fec09e5e6163b29818a
[title] =>
[isdraft] => false
[chk_timestamp] => 1269858844
[new_timestamp] => 2010-03-29 12:34
[categories] => Array ( [0] => 0 )
[body] =>
[allow_comments] => true
[extended] =>
[announce_entries_Ping-o-Matic] => true
[announce_entries_technorati.com] => true
[announce_entries_weblogs.com] => true
[announce_entries_Yahoo!] => true
[announce_entries_Blogbot.dk] => true
[announce_entries_Google] => true
[enable_trackback] => on
[additional_trackbacks] =>
[properties] => Array (
[freetag_tagList] =>
[hReview_name] =>
[hReview_type] => product
[hReview_url] =>
[hReview_image] =>
[hReview_rating] =>
[hReview_summary] =>
[hReview_desc] =>
[hReview_date] => 2010-03-29 12:34
[hReview_timezone] => Z
[hReview_reviewer] =>
[hCalendar_summary] =>
[hCalendar_location] =>
[hCalendar_url] =>
[hCalendar_startdate] => 2010-03-29 12:34
[hCalendar_enddate] => 2010-03-29 12:34
[hCalendar_timezone] => Z
[hCalendar_desc] =>
[access] => public
[entrypassword] =>
[CustomField1] =>
[CustomField2] =>
[CustomField3] => )
[change_author] => 1
[subpage] => )
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: freetag plugin generates SQL error
Hi!
Hm, the option "mf_type" is missing, that would be part of a input type in the microformats backend. I suppose when you write your test-entry, you don'T use the microformats feature?
Then a check to see if that value is set should be sufficient to not show an error message:
HTH,
Garvin
Hm, the option "mf_type" is missing, that would be part of a input type in the microformats backend. I suppose when you write your test-entry, you don'T use the microformats feature?
Then a check to see if that value is set should be sufficient to not show an error message:
Code: Select all
--- serendipity_event_microformats.php 1 Mar 2010 11:51:45 -0000 1.11
+++ serendipity_event_microformats.php 30 Mar 2010 10:42:58 -0000
@@ -59,7 +59,7 @@
$propbag->add('description', PLUGIN_EVENT_MICROFORMATS_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Matthias Gutjahr');
- $propbag->add('version', '0.44');
+ $propbag->add('version', '0.45');
$propbag->add('requirements', array(
'serendipity' => '0.9',
'smarty' => '2.6.7',
@@ -246,7 +246,7 @@
break;
case 'backend_display':
- if (is_array($serendipity['POST']['properties']) && count($serendipity['POST']['properties']) > 0){
+ if (is_array($serendipity['POST']['properties']) && count($serendipity['POST']['properties']) > 0 && isset($serendipity['POST']['properties']['mf_type'])){
$supported_properties =& $this->getSupportedProperties($serendipity['POST']['properties']['mf_type']);
foreach($supported_properties AS $prop_key => $prop_val) {
$curr_format = (strpos($prop_key, '_') > 0) ? explode('_', $prop_key) : array(0 => $prop_key);
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: freetag plugin generates SQL error
If you mean "i don't use any options from microformats" then you are right. I only need this for some of my postings, not for all of them.garvinhicking wrote:Hm, the option "mf_type" is missing, that would be part of a input type in the microformats backend. I suppose when you write your test-entry, you don'T use the microformats feature?
Works, the warnings are gone.Then a check to see if that value is set should be sufficient to not show an error message:
Another problem fixed
![Wink ;-)](./images/smilies/icon_wink.gif)