Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial changer not working #18

Closed
BastelPichi opened this issue Oct 15, 2021 · 12 comments
Closed

Tutorial changer not working #18

BastelPichi opened this issue Oct 15, 2021 · 12 comments
Assignees
Labels
bug Something isn't working complete This is considered complete.

Comments

@BastelPichi
Copy link

Tried some of the stuff here, and i think its awesome! The only problem I have is that the tutorial Link changer does not work. I can see the source code in the explorer, but it does not do anything.

@aa22dev
Copy link
Member

aa22dev commented Oct 23, 2021

Can you share your website link?

@BastelPichi
Copy link
Author

Already got the error. The problem is that DOMContentload triggers when the site itself is loaded - not when the site is really loaded(the time where theres this loading circle). That way it cant find the tutorial item and cant change its content.

@aa22dev aa22dev self-assigned this Oct 23, 2021
@aa22dev aa22dev added bug Something isn't working in progress This is currently worked on. labels Oct 24, 2021
@4yx
Copy link
Member

4yx commented Aug 30, 2022

The problem is that DOMContentload triggers when the site itself is loaded - not when the site is really loaded(the time where theres this loading circle). That way it cant find the tutorial item and cant change its content.

That does not seem to be the issue. I tried putting it in the header advertising area (which loads after the loading circle is complete if I'm not mistaken), changed the DOMContentLoaded to a window.AddEventListener('load'), and I tried adding the script directly in the head and body areas.
The best result I got was the tutorial link changing at first load, then, when I visited another page or hard-refreshed, gone again.

I'm not sure what's causing the issue, I suspect caching (the script getting executed only once and then, when the main page is reloaded, not loaded for a reason) but I haven't been able to find a workaround.

@4yx
Copy link
Member

4yx commented Aug 30, 2022

I'll include the best I could get to run. This time it stays consistent with page changes, but hard refreshing may still break it.

@4yx 4yx closed this as completed in 2ac5e43 Aug 30, 2022
@BastelPichi
Copy link
Author

The problem is that DOMContentload triggers when the site itself is loaded - not when the site is really loaded(the time where theres this loading circle). That way it cant find the tutorial item and cant change its content.

That does not seem to be the issue. I tried putting it in the header advertising area (which loads after the loading circle is complete if I'm not mistaken), changed the DOMContentLoaded to a window.AddEventListener('load'), and I tried adding the script directly in the head and body areas. The best result I got was the tutorial link changing at first load, then, when I visited another page or hard-refreshed, gone again.

I'm not sure what's causing the issue, I suspect caching (the script getting executed only once and then, when the main page is reloaded, not loaded for a reason) but I haven't been able to find a workaround.

Well for me it worked to just add a delay. Best way of course is to update the render list thingy like Hans, but idk

@4yx
Copy link
Member

4yx commented Aug 30, 2022

Well for me it worked to just add a delay.

Oh that is interesting. Does my update work for you, if not, do you think you could contribute the change you made with the delay?

Best way of course is to update the render list thingy like Hans

There are always better solutions, yes, and I imagine Hans as a much more experienced developer has written a better solution, I do not want to take a look at his code as I don't want to be opened to a copyright infringement. If no other solution works I could look up on how to update a render list and see how to apply that to VistaPanel.

@BastelPichi
Copy link
Author

vPanel gets rendered from a list called "PAGE.appGroups". You just gotta modify the values. Thats it. Hans has a pretty convenient code for that, but coding your own shouldnt be too hard.

@BastelPichi
Copy link
Author

vPanel gets rendered from a list called "PAGE.appGroups". You just gotta modify the values. Thats it. Hans has a pretty convenient code for that, but coding your own shouldnt be too hard.

Havent tried the new code yet.

@4yx
Copy link
Member

4yx commented Sep 1, 2022

Thanks! It is working sometimes and others not, I tested it myself. Bummer.

vPanel gets rendered from a list called "PAGE.appGroups". You just gotta modify the values. Thats it. Hans has a pretty convenient code for that, but coding your own shouldnt be too hard.

I know what you're mentioning, I'd seen it before in the source code view, but it never crossed my mind to modify that. I will look into it.

Reopening the issue as it wasn't fixed at all.

EDIT: I GOT IT! Pushing an update soon. Thanks for all the help!

@4yx 4yx reopened this Sep 1, 2022
@4yx 4yx closed this as completed in 5d63db6 Sep 1, 2022
@4yx 4yx added complete This is considered complete. and removed bug Something isn't working in progress This is currently worked on. labels Sep 1, 2022
@BastelPichi
Copy link
Author

Just one more thing. If Ifastnet changes the itemlist, wont that brake? lol...
Ill look into it tmrrow or so

@4yx
Copy link
Member

4yx commented Sep 2, 2022

Just one more thing. If Ifastnet changes the itemlist, wont that brake? lol... Ill look into it tmrrow or so

If iFastNet changes the order of the item list, or the item list itself, I'll make sure to update it. I'll agree it wasn't the best solution, probably, but it was the quickest I could think of. In any case, it should be working as intended, and I doubt iFastNet is going to be updating that list anytime soon.

@4yx 4yx added the bug Something isn't working label Sep 3, 2022
4yx added a commit that referenced this issue Sep 13, 2022
The following changes were made:
* Update credits, in a way that does not preserve needless comments. Enforce a consistent style on date writing.
* Fix bug in AlterVP that caused the code for the credits description to be executed even if disabled.
* Update Tutorial Link Changer, with a much better way of replacing the link, and fixing an issue where it would not be replaced sometimes. If you still face an issue, feel free to update #18 or make a new issue.
@4yx
Copy link
Member

4yx commented Sep 13, 2022

As a matter of fact, I just updated it in a way that ensures that, as long as the item list remains the same, it will work regardless of order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working complete This is considered complete.
Projects
None yet
Development

No branches or pull requests

3 participants