Let $R$ be a unity conmutative ring and $I \subset J \subset R$ ideals of $R$. Is it true that if $J / I$ is principal, then $J$ is principal? This question has came to me on other excercise in which, in case of being true, it can be applied to solve it, but I do not know how to prove it.
If it is not, is there any conditions that can be imposed on $R, I$ or $J$ to make it true? (appart from supposing that $R$ is a PID)
No!
Let $I=(x)\subset J=(x,y)\subset R=k[x,y]$, then $J/I=(y)$ is a principal ideal of $R/I=k[x,y]/(x)$. Suppose for contradiction that $J=(x,y)$ is principal, equal to $(f)$ for $f\in k[x,y]$. Then $f|x$ and $f|y$ so $f=1$ as $\operatorname{gcd}(x,y)=1$. So $J=(1)=k[x,y]$ and $J=(x,y)\ne k[x,y]$, a contradiction. So $J$ is not principal.