Reputation: 1405
I have Joomla 2.5 installed.
I developed some little module which generates html code.
Now, when it outputs the generated code, Joomla wraps it in <p> tags.
This causes two problems:
1. My css doesn't apply well because of paragraphing.
2. Paragraphs are crossing other tags.
For example here is a part of the module code:
<div class="formBlock">
<div class="label"><?php echo LABEL_PROJ_DESC; ?></div>
<textarea class="descbox"
id="descriptionBox"
name="rp_proj_desc"
cols="35"
rows="6"><?php echo $sender_description; ?></textarea>
</div>
<div class="formBlock">
<div class="label"><?php echo LABEL_PRODUCTS; ?></div>
<div class="formTable">
<?php
foreach($products as $id => $product)
{
$checked = "";
foreach($selectedProducts as $selectedId => $name)
{
if ($id == $selectedId)
{
$checked = "yes";
break;
}
}
?>
<div class="productsRow">
<span>
<input class="formCheckbox"
type="checkbox"
<?php
if ($checked)
{
echo "checked=yes ";
}
?>
name="<?php echo PROD_PREFIX . $id; ?>" />
</span>
<span class="productsName"><?php echo trim($product); ?></span>
</div>
<?php
}
?>
</div>
</div>
What I actually get is:
<div class="formBlock">
<div class="label">Your project description:</div>
<p> <textarea class="descbox"
id="descriptionBox"
name="rp_proj_desc"
cols="35"
rows="6"></textarea>
</div>
<div class="formBlock">
<div class="label">Our products you interested in:</div>
<div class="formTable">
<div class="productsRow">
<span></p>
<input class="formCheckbox"
type="checkbox"
name="product_0" />
</span>
<span class="productsName">Product1</span>
</div>
<div class="productsRow">
<span></p>
<input class="formCheckbox"
type="checkbox"
name="product_1" />
</span>
<span class="productsName">Product2</span>
</div>
<div class="productsRow">
<span></p>
<input class="formCheckbox"
type="checkbox"
name="product_2" />
</span>
<span class="productsName">Cheese</span>
</div>
</p>
</div>
</div>
Put attention to <p> and </p> tags.
If search amount of <p> and </p> elements in "view source" page it will:
<p> - 12
</p> - 18
It means that something really wrong happening with Joomla...
I guess that it is some plugin influencing it. I listed all plugins, especially those of type - "content" but didn't find any causing the problem.
These are the enabled plugins:
plg_editors-xtd_article
plg_finder_categories
plg_search_categories
plg_editors_codemirror
Xmap - Content Plugin
plg_finder_contacts
plg_search_contacts
plg_finder_content
plg_search_content
plg_system_debug
plg_content_emailcloak
plg_quickicon_extensionupdate
System - Gantry
plg_content_geshi
plg_system_highlight
plg_editors-xtd_image
Content - ITPShare
Editor - JCE
plg_authentication_joomla
plg_extension_joomla
plg_user_joomla
plg_quickicon_joomlaupdate
System - Jquery
plg_content_loadmodule
plg_system_log
plg_system_logout
AcyMailing Manage text
plg_finder_newsfeeds
plg_search_newsfeeds
plg_editors_none
AcyMailing Tag : Website links
plg_system_p3p
plg_content_pagebreak
plg_editors-xtd_pagebreak
plg_content_pagenavigation
plg_editors-xtd_readmore
plg_captcha_recaptcha
plg_system_redirect
AcyMailing : (auto)Subscribe during Joomla registration
plg_system_remember
System - RokExtender
plg_system_sef
AcyMailing : share on social networks
SIGE
AcyMailing : Statistics Plugin
AcyMailing table of contents generator
AcyMailing Tag : content insertion
AcyMailing Tag : Subscriber information
AcyMailing Tag : Manage the Subscription
AcyMailing Tag : Date / Time
AcyMailing Tag : Joomla User Information
AcyMailing Template Class Replacer
plg_editors_tinymce
plg_content_vote
plg_finder_weblinks
plg_search_weblinks
System - Shortcodes
Any ideas?
Upvotes: 0
Views: 3702
Reputation: 1405
Solved!!! It was System - Shortcodes plugin of Zauan Shortcodes which distroyed my code.
Upvotes: 1
Reputation: 53545
It's the editor (probably TinyMCE) that inserts these <p>
tags. You should consider switching to "no editor" option (or another editor) - it can be set under "Global Configuration" screen, in the "Site" tab.
Also, in order to embed PHP code in your articles you should use a plugin such as DirectPHP.
Upvotes: 1
Reputation: 622
Make sure that the textbox you created is not an RTF field. If you use RTF field, then
tags would be created automatically.
Upvotes: 0