Jump to content

SQLSTATE[42000]: Syntax error or access violation:


Marty Walker
 Share

Recommended Posts

Does anyone why I'm getting this erro? I'm saving a page that has a markdown field. If I change anything in that field I get this:  

SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'rootparent'

The only thing that I can think of is I'm embedding some twitter markup which looks like:

<blockquote class="twitter-tweet" lang="en"><p>texthere</p>— Jeff Selser (@jeffselser) <a href="https://twitter.com/">March 8, 2014</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

I even have Content Type set to unknown. If I remove that script line it works ok but I would like to have the twitter styling.

Link to comment
Share on other sites

  • 2 weeks later...

I have a feeling you are hitting up against mod_security here, because there is no logical reason why some markup in a field should cause that error, unless something was modifying the submission. mod_security can be pesky in that it doesn't like certain combinations of markup in POST vars, especially <script> tags. One thing you could try is converting the script portion to a Hanna code, though mod_security might still give you trouble... so you could trick it by using a PHP Hanna code that does something like this:

echo "<";
echo "script";
echo "async src='...' charset='utf-8'></";
echo "script";
echo ">";
  • Like 2
Link to comment
Share on other sites

  • 5 months later...

Hi!

I have/had the same issue, but this time with an IFRAME. 

This page resulted in the "SQLSTATE[42000]: Syntax error or access violation" error when saving the page.

<iframe src="//www.someurl.com/" title="Title of the page" frameborder="0" width="745" height="1485"></iframe>

But the following code worked fine:

<iframe src="https://www.someurl.com/" title="Title of the page" frameborder="0" width="745" height="1485"></iframe>

So it seems that the protocol-relative URL is causing the error.

//Jasper

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...