I solves the elements portal puzzle.
SPOILER!! I found the switch next to the portal in the chuirch/library room. now where do i go. I got the spell from the spirit of immaculate. every portal leads me back to the central portal in the main portal room. END SPOILER

I dont know what to do next