WebSite X5Help Center

 
Tom G.
Tom G.
User

WebSite X5 Pro 15 - Dołączone pliki JavaScript znikają w czasie pracy nad stroną  pl

Autor: Tom G.
Visited 1496, Followers 1, Udostępniony 0  

Mam następujący problem, z którym Incomedia odmawia pomocy, twierdząc, że nie bieże odpowiedzialności za własny HTML/JavaScript zawarty w projekcie.

unfortunately I cannot help you with the use of custom code. Generally speaking since the functions do not depend on WebSite X5, you can search useful information about the custom code with search engines like google or wait until someone on the community of Help Center can help you.

Moja testowa strona ma jedynie text tytułowy plus dołączony mój własny kod JavaScript. Początkowo wygląda to tak:

Po „podłączeniu” mego skryptu, który czyta plik z tekstem i wyświetla go na stronie otrzymuję:

Problem, jaki znalazłem jest następujący: WebSite X5 Pro 15 w pewnym momencie kompletnie usuwa moje skrypty z folderu. Pojawiają się one z powrotem tylko, gdy uruchomię Podgląd (Preview).

Załączm dowód w filmiku z ekranu.

Ponieważ Incomedia nie chce (myślę, że nie potrafi) mi pomóc, może ktoś z Was będzie miał pomysł co z tym problemem zrobić. Folder jest „Read-only”:

 

Kilka tygodni temu próbowałem mój problem opublikować, ale nie dostałem żadnej sugestji... Może teraz?

Posted on the
5 ODPOWIEDZI - 1 POMOCNY - 1 PRAWIDłOWA ODPOWIEDź
Incomedia
Stefano G.
Incomedia

Hi Thomas.

I've tried to verify the issue you reported, considering this particular one has to do with the way the preview files are handled inside the software.

I verified on v15, by adding the files to the project at Step 2 under "Seo, Code...".

After adding them there and launching the preview, I can see them being added to the Preview Folder.

If I move from Map to Pages though, my files remain there.

Of course if I delete them by myself, they won't be added anymore.

How are you adding the files on the project? If you're doing it the same way as I am, can you verify if this happens on other projects too or this one only?

Please keep me updated

Stefano

GOOGLE TRANSLATE --- 

Cześć Thomas.

Próbowałem zweryfikować zgłoszony problem, biorąc pod uwagę, że ten konkretny dotyczy sposobu, w jaki pliki podglądu są obsługiwane wewnątrz oprogramowania.

Sprawdziłem na v15, dodając pliki do projektu w kroku 2 pod "Seo, Code ...".

Po dodaniu ich i uruchomieniu podglądu widzę, że są one dodawane do folderu podglądu.

Jeśli jednak przejdę z mapy na strony, moje pliki pozostaną tam.

Oczywiście, jeśli usuniemy je sam, nie będą one już dodawane.

W jaki sposób dodajecie pliki do projektu? Jeśli robisz to w taki sam sposób jak ja, czy możesz sprawdzić, czy dzieje się to również w innych projektach lub tylko w tym?

Proszę informuj mnie na bieżąco

Stefano

Czytaj więcej
Posted on the from Stefano G.
Tom G.
Tom G.
User
Autor

Thank you, Stefano, for your response!

Looks like you did something I didn't do... I just don't understand what is "Seo, Code..." in Step 2...

My procedure:

I created folder Preview/JS, where I put my Java scripts.

Then in WebSite X5 v15 I put following in Step 3 - Map/HOME/Properties/Expert:

(where fGetTextNEW() is the name of the function in the script)

and in Step 4 - Pages/HTML Code/Content/HTML Code tab:

and in Step 4 - Pages/HTML Code/Content/Expert tab in Files Linked to HTML Code:

Looking in "Inspect Source" on the Preview page the results are correct:

In <head> section:

and HTML code generated in <body> (for id="From_Text_File"):

Let me know if this procedure is wrong!

Czytaj więcej
Posted on the from Tom G.
Tom G.
Tom G.
User
Autor

One more interesting thing:

When I close the WSX5 while the scripts ar gone from Preview/JS folder, the folder remains empty. But after starting software again, the scripts magically re-appear!

Czytaj więcej
Posted on the from Tom G.
Incomedia
Stefano G.
Incomedia

Hi Thomas.

That is indeed normal, since the preview files get updated regularly by the software.

First of all, if I understand correctly, when you launch the preview, the files are there anyway, so it should still work.

That being said, you're linking the files in an HTML Object in Step 4 per a specific page.

I mistakenly mentioned Step 2, when it's actually Step 1:

here you can paste the same code and link files that have to be there for the whole website, and not only for a single page :

Like this, I don't see my files disappearing.

Can you verify this?

Thank you!

Stefano

Czytaj więcej
Posted on the from Stefano G.
Tom G.
Tom G.
User
Autor

Thank you, Stefano, for your instructions!

I re-did the project from scratch. Here is what I did:

  • Created and saved blank project with title only, just to get project's folder Preview created.
  • Created Preview\JS and Project\MyFiles and put there my scripts and the text file.
  • In Step 1 - Settings/Advanced/Statistics, SEO and Code/Expert i added my Java scripts in Files linked to HTML code section.
  • In Step 3 - Map/HOME/Properties/Expert I put just one line: "<script>fGetText();</script>", where fGetText() is the name of the Java function called.
  • In Step 4 - Pages/HTML Code row/Content/HTML Code I put one line: "<div id=From_Text_File></div>" (the function called will add <div>s for #From_Text_File).

The only difference between your procedure and mine was that I added my Java scripts in Step 4 - Pages/HTML Code row/Content/Expert and not in Step 1 - Settings/Advanced/Statistics, SEO and Code/Expert.

And it worked fine!!! I did all possible to make the software delete scripts from the folder, but they stayed!

So, again, thank you, Stefano, for your input! I almost gave up after negative/useless responses from another Incomedia support person and also Incomedia emails.

Now I have the procedure to properly use own scripts within WebSite X5 15!!!

Czytaj więcej
Posted on the from Tom G.