Search…

X3 Photo Gallery Support Forums

Search…
 
leirum1980
Topic Author
Posts: 12
Joined: 17 Nov 2014, 16:17

Code error!

18 Nov 2014, 13:18

Hi Karl,
I have a problem, sometimes when saving changes to the code adds the symbol "\" ;so that the code does not work.

As an example:


## Google Maps
<div class=\"flex-video x3-style-frame\">
<iframe src=\"https://www.google.com/maps/embed?pb=!1 ... 5268600966\" frameborder=\"0\" style=\"border:0\"></iframe>
</div>



I tried it from safari, chrome and firefox. And it happens in all three
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Code error!

18 Nov 2014, 14:14

This has something to do with escaping quotes on your server ... I will look into it shortly. In the meantime, you can use single-quotes like this:
Code
<div class='flex-video x3-style-frame'>
If you want to learn a modern html5 trick while you are at it, you can actually ignore the "quotes", as long as the value inside the quotes does not have multiple instances separated by spaces. Your example could be added like this:
Code
<div class='flex-video x3-style-frame'>
<iframe src=https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d424396.3176723366!2d150.92243255000002!3d-33.7969235!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6b129838f39a743f%3A0x3017d681632a850!2sSydney+NSW%2C+Australia!5e0!3m2!1sen!2sth!4v1415268600966 frameborder=0 style=border:0></iframe>
</div>
 
leirum1980
Topic Author
Posts: 12
Joined: 17 Nov 2014, 16:17

Re: Code error!

18 Nov 2014, 14:44

Original code:

## Google Maps
<div class="flex-video x3-style-frame">
<iframe src="https://www.google.com/maps/embed?pb=!1 ... 5268600966" frameborder="0" style="border:0"></iframe>
</div>


And the code generated by pressing the save button, and refresh the page.

## Google Maps
<div class=\"flex-video x3-style-frame\">
<iframe src=\"https://www.google.com/maps/embed?pb=!1 ... 5268600966\" frameborder=\"0\" style=\"border:0\"></iframe>
</div>
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Code error!

18 Nov 2014, 14:57

Yep. But did I not just suggest for you to use 'single-quotes' instead of "double-quotes"?
 
leirum1980
Topic Author
Posts: 12
Joined: 17 Nov 2014, 16:17

Re: Code error!

18 Nov 2014, 15:36

Ahhhhhhhh okkkk, you're a crack :D :D :D :D :D


Thanks Karl!!
 
leirum1980
Topic Author
Posts: 12
Joined: 17 Nov 2014, 16:17

Re: Code error!

18 Nov 2014, 15:43

Just try with single quotes and the same thing happens :cry: :cry: :cry:


Original:

## Google Maps
<div class='flex-video x3-style-frame'>
<iframe src='https://www.google.com/maps/embed?pb=!1 ... 5268600966' frameborder='0' style='border:0'></iframe>
</div>


After pressing the button to save:

## Google Maps
<div class=\'flex-video x3-style-frame\'>
<iframe src=\'https://www.google.com/maps/embed?pb=!1 ... 5268600966\' frameborder=\'0\' style=\'border:0\'></iframe>
</div>
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Code error!

19 Nov 2014, 05:14

leirum1980 wrote:Just try with single quotes and the same thing happens :cry: :cry: :cry:
Could you offer me login to your panel so I can try it for myself?

Also, please follow the instructions to upload the new X3 diagnostics check, as I want to see if it is related to a missing character-encoding extension:
viewtopic.php?f=51&t=8336
 
leirum1980
Topic Author
Posts: 12
Joined: 17 Nov 2014, 16:17

Re: Code error!

19 Nov 2014, 14:04

Ok I have it uploaded and gives me an error accessing.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, postmaster@raulmuriel.es and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

www.raulmuriel.es/new/diag/
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Code error!

19 Nov 2014, 14:20

Although maybe not possible, I would very much like to see what's going on in that folder if you do have the opportunity to give me FTP access ...

Regardless of the above, can you check 2 things:
1. What permissions does the /diag/ folder currently have?
2. Can you see the /diag/.htaccess file? Try to rename it to default.htaccess and check the diag link again ...
 
leirum1980
Topic Author
Posts: 12
Joined: 17 Nov 2014, 16:17

Re: Code error!

19 Nov 2014, 15:37

Ok, you can access, sent you a MP with the data user / password?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Code error!

19 Nov 2014, 22:48

Ok, got it working, and your server seems fine, also the mod_rewrite test at the bottom:
http://raulmuriel.es/new/diag/

The problem was that this server gives an error when the folders permissions are set to chmod 777. This is likely a security implementation, and it is probably a good idea because they seem to have set all default permissions correctly. In fact, I don't think you need to set permissions at all for any folders because they have assigned the same user for your _ftp and _www users, which means the Imagevue script has write permissions by default.

Your default folder permissions are set to 705, which is secure but works nicely for your server:
Image

In fact, I would try to set 705 on your main content/ folder also, and check from the admin panel if you can still create folders. This is basically how permissions should be done, and it seems I need to revise the permissions-documentation to cover a few scenarios.
 
leirum1980
Topic Author
Posts: 12
Joined: 17 Nov 2014, 16:17

Re: Code error!

20 Nov 2014, 09:23

Ok, you have permission to access the folder / www

Thanks for your time !!!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Code error!

20 Nov 2014, 10:00

leirum1980 wrote:Ok, you have permission to access the folder / www
Sorry what? Isn't everything solved now?
 
leirum1980
Topic Author
Posts: 12
Joined: 17 Nov 2014, 16:17

Re: Code error!

20 Nov 2014, 14:36

No, keep adding the symbol \ every time I press the save button. :cry:

<div id=\\\\\\\\\\\\\\\"disqus_thread\\\\\\\\\\\\\\\"></div>
<script type=\\\\\\\\\\\\\\\"text/javascript\\\\\\\\\\\\\\\">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = \\\\\\\\\\\\\\\'raulmuriel\\\\\\\\\\\\\\\'; // required: replace example with your forum shortname

/* * * DON\\\\\\\\\\\\\\\'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement(\\\\\\\\\\\\\\\'script\\\\\\\\\\\\\\\'); dsq.type = \\\\\\\\\\\\\\\'text/javascript\\\\\\\\\\\\\\\'; dsq.async = true;
dsq.src = \\\\\\\\\\\\\\\'//\\\\\\\\\\\\\\\' + disqus_shortname + \\\\\\\\\\\\\\\'.disqus.com/embed.js\\\\\\\\\\\\\\\';
(document.getElementsByTagName(\\\\\\\\\\\\\\\'head\\\\\\\\\\\\\\\')[0] || document.getElementsByTagName(\\\\\\\\\\\\\\\'body\\\\\\\\\\\\\\\')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href=\\\\\\\\\\\\\\\"http://disqus.com/?ref_noscript\\\\\\\\ ... ">comments powered by Disqus.</a></noscript>
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Code error!

21 Nov 2014, 00:14

I will look into this issue today, as I have access to your website.

Just for reference, the above is NOT how you add disqus to X3. To add disqus to X3, simply write "disqus" in the pages layout setting in addition to anything else you might have there:
Code
layout: disqus