Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-29254

Cannot add new blog entries after update

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Blog
    • Labels:
    • Database:
      Any, MySQL
    • Testing Instructions:
      Hide
      1. Log in as admin
      2. Add new blog entry (Home -> My profile -> Blogs -> Add a new entry)
      3. make sure you don't get any error
      4. Add external blog in your profile http://feeds.feedburner.com/ElBlogDeEnriqueDans (Settings -> Blogs -> External blogs)
      5. Run Cron
      6. make sure you don't get any error
        NOTE: check php error log as well.
      Show
      Log in as admin Add new blog entry (Home -> My profile -> Blogs -> Add a new entry) make sure you don't get any error Add external blog in your profile http://feeds.feedburner.com/ElBlogDeEnriqueDans (Settings -> Blogs -> External blogs) Run Cron make sure you don't get any error NOTE: check php error log as well.
    • Workaround:
      Hide

      Everything gets solved by issuing:

      mysql> alter table mdl_post MODIFY COLUMN summary longtext;
      mysql> alter table mdl_post MODIFY COLUMN content longtext;

      Show
      Everything gets solved by issuing: mysql> alter table mdl_post MODIFY COLUMN summary longtext; mysql> alter table mdl_post MODIFY COLUMN content longtext;
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-mdl-29254

      Description

      I've done an update from moodle 1.9.12 to moodle 2.1.1

      When I try to add a new entry blog I get an 'Error writing to database'.

      What error log says is something like this:

      [Tue Sep 06 13:48:56 2011] [error] Default exception handler: Error writing to database Debug: Column 'summary' cannot be null
       
      bla,bla,bla... :)
       
       line 186 of /blog/edit.php: call to blog_entry->add()
      , referer: http://moodle2.cleome.uji.es:81/blog/edit.php?action=add

      Problem is that after the update column summary and content stays defined as NOT NULL (as defined un my 1.9.x installation).

      I've seen xmldb definition and this two fields are not defined as NOT NULL (in 1.9.x too)... so maybe this problem comes from an earlier update.

      Maybe someone has the same problem...

      Regards

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for reporting that and providing a workaround.

              I couldn't find a report with similar circumstances.

              Show
              salvetore Michael de Raadt added a comment - Thanks for reporting that and providing a workaround. I couldn't find a report with similar circumstances.
              Hide
              jsegarra Juan Segarra Montesinos added a comment - - edited

              I've compared my schema with a clean installation and there are many diferences... Our upgrading path was 1.6.x -> 1.8.x -> 1.9.x over the years. I thinks some steps were missed during this time

              Show
              jsegarra Juan Segarra Montesinos added a comment - - edited I've compared my schema with a clean installation and there are many diferences... Our upgrading path was 1.6.x -> 1.8.x -> 1.9.x over the years. I thinks some steps were missed during this time
              Hide
              weathertation Jim Peterson added a comment -

              I am wondering if there are any downsides to the fix stated above. I have the same issue, and it fixes the problems on my test server but before I run the fix on the production server I am wondering what the unintended consequences might be.

              Show
              weathertation Jim Peterson added a comment - I am wondering if there are any downsides to the fix stated above. I have the same issue, and it fixes the problems on my test server but before I run the fix on the production server I am wondering what the unintended consequences might be.
              Hide
              phalacee Jason Fowler added a comment -

              Will be fixed by MDL-30521 - Handled by Raj

              Show
              phalacee Jason Fowler added a comment - Will be fixed by MDL-30521 - Handled by Raj
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              As mentioned in description, this happened because summary and content were set "not null".
              Also, (as mentioned) it is not an issue in 1.9+. I agree this might have propagated from 1.8.x or back.
              I will add this check in upgrade script and it should be fine

              Show
              rajeshtaneja Rajesh Taneja added a comment - As mentioned in description, this happened because summary and content were set "not null". Also, (as mentioned) it is not an issue in 1.9+. I agree this might have propagated from 1.8.x or back. I will add this check in upgrade script and it should be fine
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Reopening this issue. After talking with Sam, it seems like we need two separate patches for MDL-30521 and this.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Reopening this issue. After talking with Sam, it seems like we need two separate patches for MDL-30521 and this.
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Changing priority to blocker, as it's caused by inconsistency in database.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Changing priority to blocker, as it's caused by inconsistency in database.
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Please advice, if 20 and 19 branches are required for this bug.
              Also, I have bumped 1 extra version considering a version bump by MDL-30521, to avoid conflicts.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Please advice, if 20 and 19 branches are required for this bug. Also, I have bumped 1 extra version considering a version bump by MDL-30521 , to avoid conflicts.
              Hide
              phalacee Jason Fowler added a comment -

              Code looks good Raj

              Show
              phalacee Jason Fowler added a comment - Code looks good Raj
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

              TIA and ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Branches re-based.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Branches re-based.
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks Raj, this has been integrated now

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks Raj, this has been integrated now
              Hide
              gerry Gerard Caulfield added a comment -

              No errors at any stage on master, 22 or 21. Test passed.

              Show
              gerry Gerard Caulfield added a comment - No errors at any stage on master, 22 or 21. Test passed.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Some changes to Moodle should be milestones in the project by themselves.

              This is not the case and your fix is not so important, but your collaboration is highly appreciated, thanks!

              Closing as fixed, ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Some changes to Moodle should be milestones in the project by themselves. This is not the case and your fix is not so important, but your collaboration is highly appreciated, thanks! Closing as fixed, ciao

                People

                • Votes:
                  2 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Mar/12