app/models/page.rb
# Occasionally you'll see "NO NAME" for some page IDs (in searches, associations, collections, and so on), and this
# can be caused by the native_node_id being set to a node that no longer exists. You should try and track down the
# source of that problem, but this code can be used to (slowly) fix the problem, where it's possible to do so:
Occasionally you'll see "NO NAME" for some page IDs (in searches, associations, collections, and so on), and this
can be caused by the native_node_id being set to a node that no longer exists. You should try and track down the
source of that problem, but this code can be used to (slowly) fix the problem, where it's possible to do so.
Occasionally you ' ll see " NO NAME " for some page IDs ( in searches associations collections and so on ) and this can be caused by the native_node_id being set to a node that no longer exists . You should try and track down the source of that problem but this code can be used to ( slowly ) fix the problem where it ' s possible to do so .
def fix_low_position_exmplars
      PageContent.media.where(position: 1).joins(:page).
        where('`pages`.`medium_id` != `page_contents`.`content_id`').includes(:page).find_each do |pc|
          pc.move_to_top
        end
    end
def fix_low_position_exmplars PageContent . media . where ( position : 1 ) . joins ( :page ) . where ( '`pages`.`medium_id` != `page_contents`.`content_id`' ) . includes ( :page ) . find_each do | pc | pc . move_to_top end end
Occasionally you'll see "NO NAME" for some page IDs (in searches, associations, collections, and so on), and this
can be caused by the native_node_id being set to a node that no longer exists.
Occasionally you ' ll see " NO NAME " for some page IDs ( in searches associations collections and so on ) and this can be caused by the native_node_id being set to a node that no longer exists .