ejabberd - Comments for "2.1 Beta Pubsub invalid-payload" https://www.ejabberd.im/node/3646 en Fix in progress https://www.ejabberd.im/node/3646#comment-54794 <p>Thanks for resolving this in rc3!</p> Wed, 21 Oct 2009 23:37:12 +0000 Liam comment 54794 at https://www.ejabberd.im Tracked in https://www.ejabberd.im/node/3646#comment-54789 <p>Tracked in <noindex><a href="https://support.process-one.net/browse/EJAB-1083" title="https://support.process-one.net/browse/EJAB-1083" rel="nofollow" >https://support.process-one.net/browse/EJAB-1083</a></noindex></p> Wed, 21 Oct 2009 18:08:18 +0000 mfoss comment 54789 at https://www.ejabberd.im I paste here initial replies https://www.ejabberd.im/node/3646#comment-54785 <p>I paste here initial replies provided by Christophe Romain. If they don't solve the questions, you can submit your questions as tickets in the bug tracker, and they will get more detailed analysis.</p> <p>Replies:</p> <p>1) pubsub#type was, at the begining of plugin implementation, mapped with node plugin name. I think this is not used anymore. I'd have to check this. pubsub#type is allowed in form. I just think it's informative only (not linked with anything).</p> <p>2) Not including plain text.</p> <p>3) Multiple items is bad idea and I think this have been removed in 1.13</p> Wed, 21 Oct 2009 17:11:52 +0000 mfoss comment 54785 at https://www.ejabberd.im Pubsub bug reports https://www.ejabberd.im/node/3646#comment-54782 <p>In 2.1.0-rc1...</p> <p>1) The node config form does not include &lt;field var='pubsub#type'/&gt; -- let alone define that as Atom. The pubsub module should allow configuring this field.</p> <p>2) The pubsub spec doesn't specify Atom as the default node namespace. The spec is silent on what payload namespaces are allowed if pubsub#type is undefined, but the obvious answer is ANY, including plain text. The pubsub module should allow that.</p> <p>3) The spec permits multiple &lt;item&gt; elements in a publish request, and that doesn't work for me in rc1.</p> Tue, 20 Oct 2009 23:41:14 +0000 Liam comment 54782 at https://www.ejabberd.im SOLVED https://www.ejabberd.im/node/3646#comment-54619 <p>We have now successfully published against 2.1.</p> <p>Turns out the issue was that the item node must contain an entry node, the namespace of which must explicitly be 'http://www.w3.org/2005/Atom'. This is confusing, as the XEP0060 error spec goes:</p> <div class="codeblock"><code>&lt;iq type=&#039;error&#039;<br />&nbsp;&nbsp;&nbsp; from=&#039;pubsub.shakespeare.lit&#039;<br />&nbsp;&nbsp;&nbsp; to=&#039;hamlet@denmark.lit/elsinore&#039;<br />&nbsp;&nbsp;&nbsp; id=&#039;publish1&#039;&gt;<br />&nbsp; &lt;pubsub xmlns=&#039;http://jabber.org/protocol/pubsub&#039;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;publish node=&#039;princely_musings&#039;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item id=&#039;ae890ac52d0df67ed7cfdf51b644e901&#039;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... INVALID PAYLOAD ...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/publish&gt;<br />&nbsp; &lt;/pubsub&gt;<br />&nbsp; &lt;error type=&#039;modify&#039;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;bad-request xmlns=&#039;urn:ietf:params:xml:ns:xmpp-stanzas&#039;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;invalid-payload xmlns=&#039;http://jabber.org/protocol/pubsub#errors&#039;/&gt;<br />&nbsp; &lt;/error&gt;<br />&lt;/iq&gt;</code></div> <p>It would be more informative to a beginner like me to have it read:</p> <div class="codeblock"><code>&lt;iq type=&#039;error&#039;<br />&nbsp;&nbsp;&nbsp; from=&#039;pubsub.shakespeare.lit&#039;<br />&nbsp;&nbsp;&nbsp; to=&#039;hamlet@denmark.lit/elsinore&#039;<br />&nbsp;&nbsp;&nbsp; id=&#039;publish1&#039;&gt;<br />&nbsp; &lt;pubsub xmlns=&#039;http://jabber.org/protocol/pubsub&#039;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;publish node=&#039;princely_musings&#039;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item id=&#039;ae890ac52d0df67ed7cfdf51b644e901&#039;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;entry xmlns=&#039;...INVALID NAMESPACE...&#039;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...INVALID PAYLOAD...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/entry&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/publish&gt;<br />&nbsp; &lt;/pubsub&gt;<br />&nbsp; &lt;error type=&#039;modify&#039;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;bad-request xmlns=&#039;urn:ietf:params:xml:ns:xmpp-stanzas&#039;/&gt;<br />&nbsp;&nbsp;&nbsp; &lt;invalid-payload xmlns=&#039;http://jabber.org/protocol/pubsub#errors&#039;/&gt;<br />&nbsp; &lt;/error&gt;<br />&lt;/iq&gt;</code></div> <p>Anyway, that's fixed. Thanks to everyone who looked on and particularly to badlop for helping.</p> Wed, 02 Sep 2009 05:43:46 +0000 Chris Hagan comment 54619 at https://www.ejabberd.im Thanks, I'll try that this https://www.ejabberd.im/node/3646#comment-54617 <p>Thanks, I'll try that this morning.</p> <p>(Later that morning):</p> <p>Following the example you provided, I've changed my pubsub config to 'flat', so that now the node name is simply "/mr0". The node is created without error and is discoverable through Psi. However trying to publish to it (using agsXmpp) sends the stanza:</p> <div class="codeblock"><code>&lt;iq id=&quot;agsXMPP_5&quot; type=&quot;set&quot; to=&quot;pubsub.civic.adm.monash.edu&quot;&gt;&lt;pubsub xmlns=&quot;http://jabber.org/protocol/pubsub&quot;&gt;&lt;publish node=&quot;mr0&quot;&gt;&lt;item&gt;0:STROKE&lt;/item&gt;&lt;/publish&gt;&lt;/pubsub&gt;&lt;/iq&gt;</code></div> <p>Which elicits a response of:</p> <div class="codeblock"><code>&lt;iq xmlns=&quot;jabber:client&quot; type=&quot;error&quot; from=&quot;pubsub.civic.adm.monash.edu&quot; to=&quot;0@civic.adm.monash.edu/agsXMPP&quot; xml:lang=&quot;en&quot; id=&quot;agsXMPP_5&quot;&gt;&lt;pubsub xmlns=&quot;http://jabber.org/protocol/pubsub&quot;&gt;&lt;publish node=&quot;mr0&quot;&gt;&lt;item&gt;0:STROKE&lt;/item&gt;&lt;/publish&gt;&lt;/pubsub&gt;&lt;error type=&quot;modify&quot; code=&quot;400&quot;&gt;&lt;bad-request xmlns=&quot;urn:ietf:params:xml:ns:xmpp-stanzas&quot; /&gt;&lt;invalid-payload xmlns=&quot;http://jabber.org/protocol/pubsub#errors&quot; /&gt;&lt;/error&gt;&lt;/iq&gt;</code></div> <p>This seems to me to be behaving the same way as before. Is my publish stanza correctly constructed? Thanks for your help.</p> <p>EDIT:</p> <p>By changing my node in the publish tag to "pubsub.civic.adm.monash.edu/mr0" the error has become a 404: Item not found. I'm not sure whether this is an improvement, but it certainly seems that the earier error is pretty much the response to any nonsensical item; a stanza whose node is "NONSENSE" will result in the same 400, for instance, so the 404 seems like it might be better?</p> <p>EDIT: </p> <p>Probably not an improvement. None of the tutorials use qualified node names. Also the XEP doesn't mention 404s, although the meaning is fairly clear.</p> Wed, 02 Sep 2009 03:29:48 +0000 Chris Hagan comment 54617 at https://www.ejabberd.im A similar example works for https://www.ejabberd.im/node/3646#comment-54614 <p>A similar example works for me.</p> <p>I installed ejabberd 2.1.0-beta2, created an account, logged in, and then followed the second example found in<br /> <a href="http://www.ejabberd.im/mod_pubsub-usage">How to use ejabberd's pubsub module</a>. The one that says "Example for 2.1.0 with plugin "flat"."</p> <p>I have this in ejabberd.cfg</p> <pre> {modules, [ ... {mod_pubsub, [ {access_createnode, pubsub_createnode}, {pep_sendlast_offline, false}, {last_item_cache, false}, {plugins, ["flat", "pep"]} ]}, ... ]}. </pre><p> In your case, as you want to continue using the "/home/SERVER/USERNAME" paths, you can add this plugin to the mod_pubsub option: "hometree"</p> Tue, 01 Sep 2009 12:40:24 +0000 mfoss comment 54614 at https://www.ejabberd.im