I have a Code2 module on my main page that has some PHP and escaped HTML code, I want to call a WYSIWYG area so I can easily update some and the following droplet looks perfect
Use [[ShowSection?section=1081]]
but my efforts don't work so not sure if it can be done?
Thanks.
If you are in the php world you should use: echo '[[ShowSection?section=1081]]';
If that is not solving the problem tell us some more on "my efforts don't work".
Otherwise it is very hard to tell what is wrong.
Thanks for the reply. If I use the echo statement as in your example it shows it as written [[ShowSection?section=1081]] on the page - it doesn't run the php.
Quote from: bupaje on April 17, 2013, 02:18:26 AM
it doesn't run the php.
So what does it do?
Do you see the droplet call in your output?
Do you get an error (set errorreporting to E_ALL)?
Do you see nothing?
Does it work when you add the droplet in a WYSIWYG page?
Settings error code to all does not show any errors. I simply see the unrendered code on my site.
Use [[ShowSection?section=1081]]
you can see it on this page http://stormvisions.com/ if it is still not clear. In WYSIWYG or Code2 module - no difference.
I verified that a different droplet does work so something specific to this module.
This typically has 3 possible causes..
1. Droplets are either not installed, or uninstalled.
2. The droplet "ShowSection" does not exist in your website.
3. Some other PHP error (failure) stops php before droplets are executed.
the first one is unlikely..
the second can only be checked by yourself..
the third on can be checked by calling [[lorem]] or any other standard droplet. If this fails too, do the same checks on a different page.
Weird [[Lorem]] and all others seem to work but not that one. It is installed and enabled. I copied a fresh version of the code and still no good. I'll see if sectionpicker or some other droplet or code will do what I need.
Do the droplets get stored in a particular folder or are they only in the database? I wanted to verify the actual file and permissions but long shot.
Quote from: bupaje on April 17, 2013, 10:39:31 PM
Weird [[Lorem]] and all others seem to work but not that one.
Double check the name of your showsection droplet. If there is a typo (check for blanks too) in the name this will be the result. (naming is case insensitive)
If the droplet exists, it will generate something (error/content/blank) and the [[...]] will be replaced.
Droplets are stored in the database, so no permission problems should occur.
More strangeness. I tried sectionpicker and saw that it did get the word 'Test' from the wysiwyg but showed it 5 times. Then I tried again and it printed the word Use and a balnk space 5 times and then the droplet call as plain text [[sectionpicker whatever]] then accidentally put it twice on the page and I got
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 79703315 bytes) in /home/storm59/public_html/modules/droplets/droplets.php on line 106
anyway here is the output I get from section picker
http://www.stormvisions.com/pages/home/latest-downloads.php
This looks like a sectionpicker calling another sectionpicker calling te first sectionpicker.. in the end it will crash somewhere..
I assume this must be a problem with the php setup on my host? Hmmm... I also use Incapsula to protect the website, not sure why that would affect it but anyway I know I can't do it. I'll see if I get an answer on the RSS thing (generate rss feed of last 5 Downloads Gallery and Bookmarks module as I use RSS on several places and that is simple and works well. Thank you for taking the time to answer.