SMF Support > SMF 2.0.x Support

Post page refreshes instead of posting, for some content

(1/4) > >>

TheJeremyB:
I have a weird problem with SMF 2.0.2.  Sometimes when I try and post something fairly long with some BBcode, the post page refreshes or does not post when you click Submit or Preview.  Clicking the Toggle button to go to WYSIWYG does not work when this content is in the box, but it does work when you delete everything.

Here is an example post I've tried making, that will not be submitted, previewed, or viewed with WYSIWYG:


--- Code: ---All members are expected to:

[list type=decimal]
[li][u]Respect members[/u].  Please use common courtesies and [url=http://www.albion.com/netiquette/introduction.html]netiquette[/url]. Forums are intended for a many to many communication, please be considerate of other members even if you are asking help to solve a specific issue. Helping yourself means helping other members too.[/li]
[li]Avoid linking to 3rd party resources (articles, links, sites, files, etc.) that provide contents or link to resources in violation of this policy.[/li]
[li]Avoid the use of all CAPITAL LETTERS in posts. ALL CAPS is considered "shouting" and causes readability issues.[/li]
[li]Avoid replying to an existing topic with barely related content (topic hijacking), instead, compose a [url=http://wiki.simplemachines.org/smf/Posting#Starting_a_New_Topic]new topic[/url]. Despite problems being similar in nature, it is often the case that they have many different causes. In an attempt to get more help for your specific problem please consider opening a new topic to describe your problem and then link existing related topics. This way if a strong relation is discovered those topics could be merged.[/li]
[li][u]Respect moderators[/u]. They volunteer to keep these forums running efficiently. Please respect Moderators' decisions and acknowledge that Moderators and Administrators may not be able to [i]ask for[/i] or [i]accept[/i] your feedback every time.[/li]
[/list]


Before posting, please:
[list type=decimal]
[li][u]Read Sticky Notices[/u]. Before you post or open a new topic please look for important topics (stickies ) in that board. Sticky topics may contain the information you need or additional guidelines to help you post in a way that will prove useful to all members including yourself.[/li]
[li][u]Search[/u]. Many of your questions have been answered before. To minimize noise and duplicates, search through the forums and other materials (particularly the FAQs) before you post. Please do not to resurrect a very old topic if nothing significant will be added (necroposting).[/li]
[li][u]Choose an appropriate board[/u]. If you are a new member, browse through all the boards to find the one that most closely matches the topic of your interest. Read the board description. Choosing an appropriate board will make contents easier to find.[/li]
[/list]


Unacceptable behaviours and content:
[list type=decimal]
[li][u]Offences based on age, sex, race, location, political affiliation, religion, cultural background or any other criteria[/u]. Opinions are welcome, but they may not escalate into flaming and rudeness against forum members or any other party. We do not allow [url=http://en.wikipedia.org/wiki/Hate_speech]hate speech[/url]. In the same vein, we do not permit the usage of explicit language on these forums and do not allow the posting or solicitation of sexually explicit material.[/li]
[li][u]Spam[/u]. We define “Spam” as any text, graphic, attachment, or link that contains or refers to any of the following: commercial advertising, product or service promotions, requests for personal or corporate donations, or sites that provide compensation for a referral (affiliate link). [url=http://en.wikipedia.org/wiki/Internet_forum#Double_posting]Double posting[/url] and crossposting are not allowed.[/li]
[li][u]Sharing accounts[/u]. Do not share accounts beyond your family members.  If you need an account for another family member, please email an administrator or [url=http://ncfhe.org/contact/]contact the webmasters[/url].[/li]
[/list]
--- End code ---

I've tried disabling the character limit and undoing a little bit of hard coding in SMF (by using Notepad++'s compare plugin to see what is different from the default installer files).

Weirdly enough, I can select one of those three BBcode lists in the post above, click remove formatting, and it will work.  I don't think this is a problem with too long posts (I tried a long Lorem Ipsum filler, and it worked).  I don't think it is a problem with too many BBcode tags either...I tried posting something with a ton of bold tags, and it worked.

I can get around this problem by directly editing the database, and it works fine, but I'd rather not do that for every problem like this.

I'm only using one mod:
1.   Event Registration Mod    0.177 BETA

Which modifies these files:
admin_register_event.php (6953 bytes)
admin_register_event.template.php (2236 bytes)
database.php (4390 bytes)
modification.xml (33909 bytes)
package-info.xml (1137 bytes)
readme.txt (6480 bytes)
RegisterEvent.php (6217 bytes)
TermsAndConditions.template.php (1393 bytes)



Any ideas?  I tried different browsers too, but no go.  I'm not getting any errors for this.  The only error in the last few days is:


--- Quote ---http://ncfhe.org/forums/index.php?action=jseditor;view=0;ba4f9bcd=f72b9ea0add5aba99ab1f383fd606a76;xml2 [nofollow]: str_repeat() [<a href='function.str-repeat'>function.str-repeat</a>]: Second argument has to be greater than or equal to 0File: /home/ncfheorg/public_html/forums/Sources/Subs-Editor.php
Line: 634

--- End quote ---

Help :)

Arantor:
FYI, none of those files are SMF files at all. The key one is modification.xml, which lists all the other changes that are made to SMF's files.

Are you sure that's the only mod you're using? The mod doesn't look like it should break anything >_> (It doesn't touch Subs-Editor.php at all, and the other stuff looks pretty straightforward)

TheJeremyB:

--- Quote from: Arantor on July 12, 2012, 10:43:42 AM ---FYI, none of those files are SMF files at all. The key one is modification.xml, which lists all the other changes that are made to SMF's files.

--- End quote ---

Ah.  I attached modification.xml, then.


--- Quote from: Arantor on July 12, 2012, 10:43:42 AM ---Are you sure that's the only mod you're using? The mod doesn't look like it should break anything >_>

--- End quote ---

Pretty sure. Link to screenshot: http://i.minus.com/jkQZcamt3VVWd.jpg [nofollow]

I am using aMember and Wordpress, and all three are somewhat integrated.  By somewhat, I mean that I call Wordpress's load.php and display its header over the forum, and aMember just manages the member database (shouldn't do anything with posts).  However, I "un-integrated" Wordpress and aMember from SMF manually, and the problem remained.


--- Quote from: Arantor on July 12, 2012, 10:43:42 AM ---(It doesn't touch Subs-Editor.php at all, and the other stuff looks pretty straightforward)

--- End quote ---

I'm not even sure that error is related, since I don't get new ones each time I try and fail to submit/preview a post.  I first thought that somehow I had some escape characters in my post, but that shouldn't be able to happen.

MrPhil:
If it's only "some" posts (particularly longer ones), check to make sure "Mod Security" has been disabled. Usually that will completely reject a post with a 403 error, but your host may have an odd implementation that just strips off parts of the post, resulting in an error. SMF doesn't need Mod Security.

You're not always getting that str_repeat() error? It's repeatable with the posting you gave above? I looked over it, and didn't see any unclosed tags. The code in Sources/Subs-Post.php using str_repeat() seems to be concerned with closing BBCode tags left open at the end of the post. There is a check for both that the repeat count is nonnegative. Is this just a part of a larger post, where there might be open tags at the end? By any chance did you upgrade from an earlier version to 2.0.2, and possibly Subs-Post.php is still an earlier version? You might want to compare it against a fresh 2.0.2 copy.

TheJeremyB:

--- Quote from: MrPhil on July 12, 2012, 11:23:44 AM ---If it's only "some" posts (particularly longer ones), check to make sure "Mod Security" has been disabled. Usually that will completely reject a post with a 403 error, but your host may have an odd implementation that just strips off parts of the post, resulting in an error. SMF doesn't need Mod Security.
--- End quote ---

I followed the guide here to disable it.  Unfortunately, I still have the same problem. http://wiki.simplemachines.org/smf/Mod_security_-_Having_problems_with_mod_security


--- Quote from: MrPhil on July 12, 2012, 11:23:44 AM ---You're not always getting that str_repeat() error? It's repeatable with the posting you gave above?
--- End quote ---

Nope, I can't repeat the error.  It has only occurred once, even when I try using the sub-editor again (FYI - when I tried that post with the sub-editor, the loading bar flashes and then disappears, and nothing happens).  I'm worrying that posting it here might have led us off the trail.



--- Quote from: MrPhil on July 12, 2012, 11:23:44 AM ---Is this just a part of a larger post, where there might be open tags at the end?
--- End quote ---

No, what I quoted was the whole thing.  I tried to find an offending section by trying parts of the post at a time.  Everything worked when divided in little sections, but when I combined everything again, the submission failed.


--- Quote from: MrPhil on July 12, 2012, 11:23:44 AM ---By any chance did you upgrade from an earlier version to 2.0.2, and possibly Subs-Post.php is still an earlier version? You might want to compare it against a fresh 2.0.2 copy.

--- End quote ---

No, the installation is recent and I have not upgraded anything.  I compared Sub-Posts.php and Sub-Editor.php to fresh copies, and Notepad++ said the files match (they also have exact same file sizes).

Navigation

[0] Message Index

[#] Next page

Go to full version