Updating to the latest org-mode (9.2.1) seems to solve this issue.
I just updated emacs to 27.0.50 and I am seeing the exact same error.
I think org-preserve-local-variables is in org-macs which is part of
org-mode source code.
On Sun, Feb 3, 2019 at 4:14 PM Kyle Meyer <kyle@kyleam.com> wrote:
>
> Hello,
>
> Abdo Haji-Ali <abdo.haji.ali@gmail.com> writes:
>
> > On the latest org-mode version, 9.2, I keep receiving the error
> > 'org-copy-subtree: Invalid function: org-preserve-local-variables'
> > whenever I try to move a subtree or when I access my agenda.
> >
> > This happens even if I run emacs with '-Q'.
> >
> > Emacs : GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.10)
>
> This is very likely a problem in your Org installation due to an
> interaction with the Org version that comes with Emacs 25. (It lacks
> the macro org-preserve-local-variables.)
>
> See <https://orgmode.org/worg/org-faq.html#mixed-install>.
--
Abdo Haji-Ali
--