[BUG] Global Resources Unavailable

The global resources are no longer showing in the designer and I am getting errors when trying to call a shared script “name ‘shared’ is not defined”. Were these removed?

Did you upgrade/restore a backup from 7.9, or are you starting from scratch in 8.0?

In either of those cases, your existing ‘global’ resources were[1] moved to a new, ‘real’ project that’s just called global, which is set as the parent of all your other existing projects. The project and resource model is completely different in 8.0 - there is now a model of project inheritance, meaning one project can define resources that are then ‘inherited’ on all others below it.

The project.* and shared.* script libraries are now no longer unique, special names - they are simply part of whatever project is appropriate to them, and can be renamed, removed, or modified as appropriate. You can also make new script modules or packages that don’t follow the shared or project naming convention - you’re free to use whatever[2] name you want.

If you didn’t upgrade or restore a backup, then something’s wrong - where is your script defined, and where are you specifically using it? We did just recently (ie, this week) fix some issues with script usage, especially in gateway scopes, like tag event scripts or expression tags.

[1] - there are a few exceptions to the ‘global resources go into a global project rule’ - basically, anything that you would expect to continue running whenever the gateway is, because an inheritable project (such as the new global is inherently not “runnable”, meaning something like a scheduled report will not execute unless inherited

[2] - you still need to name it a valid python identifier to be able to actually import it, although we can’t really stop you from naming it something silly, because the resource itself just resides on your filesystem.

If he didn’t upgrade, then there’s only a global project if he decides to make a project called global, and only a “shared” package if he decided to make one, so I’d argue nothing is wrong in that case.

If this is an upgrade though everything should “just work” as before unless you’ve created a new project that you’re trying to call into the “shared” package from and haven’t set it to inherit from the global project.

2 Likes

I did upgrade from 7.9 but the part that is odd is that one of my other windows that calls the ‘shared.’ script works.

I checked the project settings on the gateway and the project didn’t have ‘global’ set as the parent. I updated it to have global be the parent and the script worked. Thanks.

1 Like

Was this a new project that you’d created since upgrading, or part of your original restore?

Part of original restore.

Would you be willing to upload this backup so we can test it here?

to be honest I think I may have unlinked it while trying to figure out why one of my perspective projects worked and the other didn’t, I was tweaking things all over.

Alrighty, let us know if you find anything else out of place.

I’m having this problem too. I updated it yesterday. What’s weird is that I’m pretty sure I had it yesterday but today I can’t see it. Also, the existing global scripts are working. The project settings on the gateway are set to global.

image

Which problem, that you don’t see your “global” resources, or something else?

What project do you have open right now? What’s in under the “Scripting” node in the tree?

Thanks… I’m stupid. I should of kept going further under the scripting node. I figured the “Project Library” was just for the project but I see what we I had as “global” scripts now under there. Like below. I guess the “Global” node is gone in 8?

image

Yes, there’s no such thing any more.

For backwards compatibility on upgrade we dumped everything you had in Global scope into a project called “global” and then pointed all your existing projects to that as a parent. And “shared” just happens to be the name of that folder holding the scripts in the “global” project now.

1 Like