Jump to:

23372 Posts in 18175 Topics by 2865 members

General Questions

SilverStripe Forums » General Questions » "Error Saving Content" - triggered by using words "select" & "from" in content

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 3000 Views
  • socks
    Avatar
    Community Member
    190 Posts

    "Error Saving Content" - triggered by using words "select" & "from" in content Link to this post

    SS 2.4.1
    DOM r414
    SWFUpload r404
    --------------

    This is the strangest thing I've seen...

    What triggers the error
    - The site only shows the error on the web host (works fine on localhost).

    - I've since determined that when any text/content block in the CMS (Page Name, Navigation Label, Content, Site Config, etc) contains both the words "select" and "from", I get "Error Saving Content" when trying to Save or Publish.

    - And it's really "select*" & "from*", so "selection", "selects", and "fromdkfjdl" will also trigger the issue. It doesn't matter where the words are in the Content, nor in what order. For example, "Select the color you like best from the options below" will trigger the issue.

    - This happens on every page type/template.

    Previous Errors
    I was getting errors like this, but not anymore…

    Error: Couldn't run query: INSERT INTO "RedirectorPage_versions" ("LinkToID", "ExternalURL", "RedirectionType", "RecordID", "Version") VALUES (25, null, 'Internal', 8, 10) Duplicate entry '8-10' for key 2
    At line 536 in /xxx/sapphire/core/model/MySQLDatabase.php

    I've updated Version.php ( http://open.silverstripe.org/ticket/5936 ) in core since the error seemed similar. Maybe I should try updating SS to the latest trunk version?

    thanks

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: "Error Saving Content" - triggered by using words "select" & "from" in content Link to this post

    I think you are seeing that exact issue. Try out 2.4.2-rc1, install it and run dev/build (or just copy the patch and run dev/build) and let me know if its still an issue and I'll have to investigate further.

    When you run dev/build you should see a bunch of removed records.

  • socks
    Avatar
    Community Member
    190 Posts

    Re: "Error Saving Content" - triggered by using words "select" & "from" in content Link to this post

    Hey Will,

    Still having the issue after upgrading to 2.4.2-rc1. I didn't see the removed records, but I think that may have happened when I initially updated the Version.php file.

    I went back and played with localhost (still at 2.4.1) and it was having issues too, but more sporadically. Typing "select from" and hitting "Save" thru the "Error Saving Content", but then I immediately clicked "Save" again and everything was fine.

    I tried that method on the webhost and it didn't help.

    Not sure what else to try.

    Thanks

  • socks
    Avatar
    Community Member
    190 Posts

    Re: "Error Saving Content" - triggered by using words "select" & "from" in content Link to this post

    I just now went ahead and tried a fresh new installation of 2.4.2 with a new database. I didn't import any data from other database, just logged in after SS installed and typed "select from" on the About Us page...Same exact issue.

  • MateuszU
    Avatar
    Community Member
    89 Posts

    Re: "Error Saving Content" - triggered by using words "select" & "from" in content Link to this post

    Hi socks,

    Regarding the select+from, this is not really reproducible on the demo site, or at least I can't make it break. Are you sure your server is configured well? No magic quotes and suchlike?

    381 ; Magic quotes for incoming GET/POST/Cookie data.
    382 magic_quotes_gpc = Off
    383
    384 ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
    385 magic_quotes_runtime = Off
    386
    387 ; Use Sybase-style magic quotes (escape ' with '' instead of \').
    388 magic_quotes_sybase = Off

    If you can pinpoint the problem, you can start a ticket on our bugtracker open.silverstripe.org too, that's the best way to get attention if the issue is with the SilverStripe core!

    Mateusz

  • socks
    Avatar
    Community Member
    190 Posts

    Re: "Error Saving Content" - triggered by using words "select" & "from" in content Link to this post

    Hey mateuzs,

    I'm not sure the server is properly configured. OneWorldHosting (shared hosting) had register_globals on by default (I turned it off), and I had them switch MySQL servers before the install since the account was still using 4.0.

    magic_quotes_gpc was On, I've turned it off in the INI file, but I still have the same issue. Any other config settings I should check? I've checked the server requirements page (http://doc.silverstripe.org/server-requirements) but didn't see anything wrong.

    Thank you

  • MateuszU
    Avatar
    Community Member
    89 Posts

    Re: "Error Saving Content" - triggered by using words "select" & "from" in content Link to this post

    Just to be sure, have you resetted the server afterwards?

    OK so the next thing is to get the error message. Switch the site to the dev mode (http://doc.silverstripe.org/environment-management) and check what's the exact error using the Firebug. Then we'll know how to fix it, hopefully.

    Mateusz

  • socks
    Avatar
    Community Member
    190 Posts

    Re: "Error Saving Content" - triggered by using words "select" & "from" in content Link to this post

    I don't think I have the option to restart a server on shared hosting, do I?

    I do have it in dev mode and I'm not getting any errors emailed to me... In Firebug I get this:

    Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    (?)()admin (line 54)
    (?)()admin (line 12)
    [Break on this error] <img id="sitetree_toggle_closed" sr...e;" title="click to open this box" />\n
    admin (line 54)

    If you would like to see it first hand, I don't mind giving u access to the cpanel or the admin since there's no content in there. You can send me a private message on IRC or give me an email address as I don't want to post that info here.

    thanks again.

    3000 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.