Divisors on cone variety not passing through cone point are principal We work over an algebraically closed field $k$, and we use "divisor" to mean Weil divisor. 
Let $V$ be a projective algebraic variety of dimension $\geq 1$ which is nonsingular in codimension one. Let $X$ be the affine cone over $V$ (the affine variety whose coordinate ring is the homogeneous coordinate ring of $V$). 

Claim: Any divisor on $X$ not passing through the cone point must be principal.

This question comes from Exercise II.6.3(d) in Hartshorne's Algebraic Geometry. I can see that the above claim is equivalent to injectivity of the map of divisor class groups $\mathrm{Cl}~X\rightarrow\mathrm{Cl}(\mathrm{Spec}~\mathcal{O}_P)$ where $\mathcal{O}_P$ is the local ring of the cone point $P$. (The exercise in Hartshorne asks us to show $\mathrm{Cl}~X\rightarrow\mathrm{Cl}(\mathrm{Spec}~\mathcal{O}_P)$ is an isomorphism; surjectivity is clear.)
The corresponding algebraic statement is the following: if $A=k[x_0,\ldots,x_n]/I$ is the homogeneous coordinate ring of $V$, any height one prime $\mathfrak{p}\subseteq A$ not contained in $\mathfrak{m}=(x_0,\ldots,x_n)$ is principal. Here, $\mathfrak{m}$ corresponds to the cone point. Note that such a prime $\mathfrak{p}$ is necessarily non-homogeneous.
How should one see this? I have been unsuccessful in verifying the claim.
 A: I solved the problem after posting this. My solution is included below.
Solution: Let $A=k[x_0,\ldots,x_n]/I$ be the homogeneous coordinate ring of $V$. Here $I$ is a homogeneous ideal. We may assume $x_i\neq 0$ in $A$ for all $i$.
The height one primes of $A$ are either homogeneous or non-homogeneous. We say that the homogeneous primes correspond to "type one" prime divisors and the non-homogeneous primes are "type two" prime divisors. (This is the terminology of Hartshorne's Proposition II.6.6.)
Let $\mathfrak{p}\subseteq A$ be a height one prime with $\mathfrak{p}\not\subseteq (x_0,\ldots,x_n)=\mathfrak{m}$. This corresponds to a prime divisor $Y$ of the cone $X$ which does not pass through the cone point $P$. Note this prime divisor is type two, because every type one divisor passes through $P$. Select $h\in \mathfrak{p}$ such that $h\equiv 1 \pmod{m}$. Pick any index $i$ and consider the successive localizations
$$A \hookrightarrow A_{x_i}=A_{(x_i)}[x_i,{x_i}^{-1}] \hookrightarrow K[x_i,{x_i}^{-1}] \subseteq \mathrm{Frac}(A)$$
where $A_{(x_i)}$ is the degree zero elements in the localization $A_{x_i}=A[x_i^{-1}]$ and $K=\mathrm{Frac}\left(A_{(x_i)}\right)$ is the function field of $V$. 
Note that the generic point of any type two divisor is contained in the chart $D(x_i)=\mathrm{Spec} ~ A_{x_i}$ (i.e. the complement of $x_i=0$), because the hyperplane section $x_i=0$ contains only type one prime divisors (every minimal prime of a homogeneous ideal is homogeneous). The same argument shows that $\mathfrak{p}$ cannot contain any nonzero homogeneous elements so $(\mathfrak{p}A_{(x_i)}[x_i,x_i^{-1}])\cap A_{(x_i)} = 0$. Indeed, the type two prime divisors are precisely the pre-images in $A$ of nonzero primes in $K[x_i,x_i^{-1}]$.
Since $K[x_i,x_i^{-1}]$ is a principal ideal domain, the extended prime $\mathfrak{p}K[x_i,x_i^{-1}] \subseteq K[x_i,x_i^{-1}]$ is principal, generated by some $f \in K[x_i,x_i^{-1}]$. Scaling by $K$, $x_i$, and $x_i^{-1}$, we may assume that the lowest degree term of $f$ is equal to $1$. 
If $Y'\neq Y$ is another type two prime divisor on $X$ with associated valuation $v_{Y'}$ on $\mathrm{Frac}(A)$, we have $v_{Y'}(Y)=0$. This is because the irreducible polynomial $f$ is contained in exactly one height one prime of $K[x_i,x_i^{-1}]$, which is the one corresponding to $Y$. We have ${v_{Y}} (f)=1$, where $v_Y$ is the valuation on $\mathrm{Frac}(A)$ associated to $Y$.
Write $h=fg$ for some $g \in K[x_i,x_i^{-1}]$. Note that $g$ must also have lowest degree term equal to $1$.
Suppose $Z$ is a type one prime divisor whose generic point lies in $D(x_i)$, and write $v_Z$ for the associated valuation on $\mathrm{Frac}(A)$. If we write
$$f=1+\sum_{\ell=1}^r a_{\ell}x_i^{\ell}$$
then $v_Z(f)=\min\limits_{\ell\in\{0,\ldots,r\}} v_Z(a_\ell)$ where $a_0=1$. Note $v_Z(f)\leq 0$ for all such $Z$. The same statements hold when $f$ is replaced with $g$. Since $h$ has smallest degree term equal to $1$, we know $h\not \in \mathfrak{q}$ for any homogeneous prime $\mathfrak{q}\subseteq A$. This implies $v_Z(h)=v_Z(fg)=0$ for all such $Z$. The non-positivity from above then implies $v_Z(f)=v_Z(g)=0$ for all such $Z$.
The chart $D(x_i)$ may not contain all type one divisors however, so pick another index $j$ and write
$$f=1+\sum_{\ell=1}^r a_{\ell}'x_j^{\ell}\in K[x_j]\subseteq K[x_j,x_j^{-1}]$$
where $a_{\ell}'=a_{\ell}(x_i/x_j)^\ell$. As an element of $\mathrm{Frac}(A)$, this $f$ is the same one as before. We may do the same for $g$. The previous argument applied to this situation then shows that $v_Z(f)=v_Z(g)=0$ for all type one divisors $Z$ whose generic point is contained in $D(x_j)$. Varying over the index $j$ so that we cover $X$, we see that $v_Z(f)=0$ for all type one divisors $Z$.
Thus the divisor on $X$ associated to the rational function $f$ is simply $Y$, i.e. $Y$ is a principal divisor.

Remark: If $A$ is not normal, I am not sure whether $f$ has to lie in $A$, i.e. $A$ may not be a Krull domain. So the algebraic reformulation in my original question may be slightly stronger than necessary.

Corollary: Let $V\subseteq \mathbb{P}^n_k$ be a projectively normal variety (i.e. the homogeneous coordinate ring is normal) and let $X$ be the affine cone over $V$. Then the Cartier class group of $X$ is trivial.
Proof: For normal varieties, the Cartier class group may be identified with the subgroup of the Weil class group given by locally principal divisors. A Weil divisor which is principal at the cone point $P$ is linearly equivalent to a divisor not passing through the cone point. By the above problem, such a divisor is principal.
Example: The cone $\mathrm{Spec} ~k[x,y,z]/(xy-z^2)$ is normal. It has trivial Cartier class group but a nontrivial Weil class group.
