| View previous topic :: View next topic |
| Author |
Message |
pepperxxx
Joined: 29 Apr 2006 Posts: 37
|
Posted: Mon May 28, 2012 1:41 am Post subject: WSW_PreprocessPage doesn't save data as expected |
|
|
Hi!
I am using Wsw_PreProcessPage in a shared plugin (I've tried private as well) to extract some valuable content from an RSS feed.
My code (simplified) looks like this:
| Code: | Sub Wsw_PreProcessPage(Handle, ByRef sMem, ByRef sStatusMessage, ByRef iStatusCode)
Dim FeedTitle
FeedTitle = GetFirstWildcardMatch(sMem, "<wswrsstitle>*</wswrsstitle>")
Bookmark_SetProperty(Handle, "infofield1", FeedTitle)
sMem = FeedTitle
End Sub |
When debugging the abovelisted Wsw_PreProcessPage function on a rarely updated RSS feed I constantly get empty sMem as well as {infofield1} in the debugger. I tried to delete the local cache of the bookmark, re-checked it many times - without any result. The source RSS feed is also never gets offline, and there is always a non-empty string between "<wswrsstitle>" and "</wswrsstitle>". What can cause the described behaviour of Wsw_PreProcessPage? The Page Source pane of the Plugin IDE shows me only the result of Wsw_PreProcessPage, i.e. the contents of FeedTitle. But when I test the subroutine in the production environment, i.e. on the live RSS feed, it continues bringing me empty updates. What's the problem? |
|
| Back to top |
|
 |
Martin Aignesberger Site Admin

Joined: 11 May 2005 Posts: 5861
|
Posted: Wed May 30, 2012 10:27 am Post subject: |
|
|
It seems that you ran into a conflict with the internal RSS feed conversion.
If you want to use Wsw_PreProcessPage in combination with an RSS feed, I would recommend to use the file type to "text", then no internal RSS feed conversion will be applied. (bookmark properties + advanced + check(1))
Instead of "<wswrsstitle>*</wswrsstitle>" you have to use "<title>*</title>" then. _________________ Martin Aignesberger [SUPPORT] |
|
| Back to top |
|
 |
pepperxxx
Joined: 29 Apr 2006 Posts: 37
|
Posted: Wed May 30, 2012 12:11 pm Post subject: |
|
|
| Thanks, Martin, this worked for me. Btw, is there any way to pass the check option you mentioned through Excel bookmark import? |
|
| Back to top |
|
 |
Martin Aignesberger Site Admin

Joined: 11 May 2005 Posts: 5861
|
Posted: Mon Jun 04, 2012 10:35 am Post subject: |
|
|
| Quote: | | Btw, is there any way to pass the check option you mentioned through Excel bookmark import? |
No, this is not possible.
But you can use the "Set properties in all selected bookmarks" feature to change that option. _________________ Martin Aignesberger [SUPPORT] |
|
| Back to top |
|
 |
|