Hi Andrew

Yes, if the view_rows_column table has no entries for the view ID then
yes this is the issue.

Ok to find out what should be in the view_rows_columns table you can do
this:

SELECT id, layout, type FROM view WHERE id = [ID];

where ID = the view id number, eg 5


If the 'layout' result is not null then run this command:

SELECT v.id, vlrc.row, vlc.columns FROM view_layout_rows_columns vlrc
JOIN view_layout_columns vlc ON vlc.id = vlrc.columns WHERE viewlayout =
[LAYOUTID];

where LAYOUTID = the number in the layout column from previous sql
query, eg 12.

It should show you what row,columns values are missing from the
view_rows_columns table.

Otherwise if the  'layout' result is null or empty it means the layout
hasn't been changed since the page was made and so we need to find the
default layout, so run this command:

SELECT vrc.row, vrc.columns FROM view v JOIN view_rows_columns vrc ON
vrc.view = v.id WHERE v.template = 2 AND v.type = [TYPE];

where TYPE = the type of the view, eg 'portfolio'

This will give you the default layout info for this view type

You can then add back in the missing data and the page should be not
broken again, for example for view ID = 5:

INSERT INTO view_rows_columns (view, row, columns) VALUES (5, 1, 3);

The patch I made does this querying for you and replacing the missing
rows automatically when you visit the page.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1626462

Title:
  image blocks disappearing from mahara page

Status in Mahara:
  Incomplete

Bug description:
  Hi,

  I'd like to report a bug with images image blocks disappearing from
  Mahara pages - this problem has occurred more than once and is
  becoming increasingly concerning. The problem arises when a user (in
  this case, a learner) uploads links images to image blocks on one of
  their personal pages. The images appear as expected however at some
  point they then seem to disappear and there is no longer any images
  displaying. This seems to be purely affecting images content blocks
  (in this case image blocks) as the comments section remains present.
  It appears that no files are actually deleted, just the blocks from
  the page are missing. It may be a problem with other types of blocks,
  but in this case, only image blocks were present on the page. I
  thought it also best to mention that I noticed this issue when logging
  in as the user (masquerading) to check something on their behalf,
  however I think this may be pure coincidental.

  The Mahara version here is 16.04.3 (2016033117) running on Linux. I
  have been able to identify this problem using Google Chrome (version
  53.0.2785.116 m). I should also report that we have been made aware of
  the same issue from another client who is also running the exact same
  version (16.04.3) and this would further suggest that this is a bug
  needing addressed.

  Thanks
  Andy

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1626462/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to