-
☆ A M B ☆
- 24,524 Posts
Does the resource show up on the Search?
Check the database for it, and make sure it has a valid parent, and is set to show in the Tree.
BobRay's SiteCheck utility does an excellent job of detecting and fixing "orphaned" resources. It's well worth the small price he charges for it, and it's licensed per-user, not per-site, so you can use it on any site you're working on.
discuss.answer
Yes, the resource shows up in Search, which is where I can open it for editing. I've checked the modx_site_content table and viewed that resources against others with the same parent (in this case, the parent is the context root), and there is nothing different about this resources other than the pagetitle and alias (content empty).
I played around with it in the database for a second, and thought that maybe it had been cached somewhere incorrectly and wasn't being treated properly. I manually changed the parent id to another (not 0) and now it's shown up in the resource tree. I can now move it out of that folder and back under root, and it still displays.
Whatever it was, it is a mystery...
I can confirm that this has happened to me with two separate resources in the same 2.31 installation inside modxcloud. I looked in phpmyadmin and the hidden resource looked the same as those that were not hidden. I applied moniarde's "fix" successfully. This is fine while I'm developing a site, but I can't had off a site to a client with this issue.
-Noah
I'd be curious to know if SiteCheck would find and fix this. It will certainly detect invalid parents, but I suspect this has something to do with the ambiguity of parent = 0 in multi-context sites.
@noahlearner: was your site multi-context as well?
@BobRay Just to clarify, my site is not multi-context.
@noahlearner We're these missing resources children of the root context, or of another resource? I'm trying to find any similarities between out missing resources that could give us a better picture of what's going on.
Quote from: moniarde at Aug 29, 2014, 07:14 PM@BobRay Just to clarify, my site is not multi-context.
Well, that blows my theory.