Tagged: Element, javascript
-
AuthorPosts
-
April 3, 2017 at 1:46 am #770826
Hello, I’m having trouble with what I believe is related to the new preview window in the advanced editor. I need to insert a snippet of javascript to access a gallery from another site. When I enter that snippet of code into a textbox, it automatically pulls up the gallery – in the same broswer window – which makes me unable to save or update my work. I’ve had this code on my page for over a year, I just happened to want to move it today. I believe the automatic redirecting may because of that new preview thing.
I have read other threads and tried changing the code in my ,,,config-templatebuilder/avia-shortcodes/textblock.php file as directed but the line that was suggested to change wasn’t even there.
Any other ideas? As an aside, I would like to have the option to close or disable the preview. It isn’t really valid anyhow because different browser windows or mobile devices will create different looks anyhow.
Thanks in advance for any help you can provide.
April 3, 2017 at 8:31 am #770941Hey pkjd,
Please, may you share with us your WP credentials and the website link to access it? And please, may you explain your question better?
Best regards,
John Torvik- This reply was modified 7 years, 7 months ago by John Torvik.
April 3, 2017 at 5:29 pm #771239I am using WP 4.7.3 and Enfold 4.0.5
My website is for promoting my jewelry work and I link to a mini gallery from etsy.com which presents four constantly updated images of my work and links back to their site, my etsy page, for shopping. Here’s the snippet:
<script type=’text/javascript’ src=’https://www.etsy.com/assets/js/etsy_mini_shop.js’></script><script type=’text/javascript’>new Etsy.Mini(6222747,’gallery’,4,1,0,’https://www.etsy.com’);</script>
I am trying to place it in a textbox using the Avia Layout Editor. I open the “text” tab in order to enter the code, I paste the code, and the browser window redirects to a blank page showing the mini gallery. I don’t redirect to etsy, I redirect to what looks to be a preview of the code. At this point, I can’t save because I’m no longer on the editing page and if I go back or refresh, nothing is saved or edited. Just like if I left the page without saving.
Hope that’s clearer.
April 3, 2017 at 10:13 pm #771386Hi!
Can you please show us some documentation regarding that Etsy widget, so we can see what is been used and how please?
Cheers!
BasilisApril 5, 2017 at 5:34 pm #772682The documentation is superficial but here is a link to the page explaining it to their users.
https://www.etsy.com/help/article/216?ref=help_search_result.April 10, 2017 at 3:14 am #775219Anyone? … Here is the snippet of code that I listed in a previous reply.
<script type=’text/javascript’ src=’https://www.etsy.com/assets/js/etsy_mini_shop.js’></script><script type=’text/javascript’>new Etsy.Mini(6222747,’gallery’,4,1,0,’https://www.etsy.com’);</script>
If you plug it into any html page, you can see the resulting 4-image gallery. Here is a screenshot of generating the code and a preview of what it would look like. http://pamandbob.com/etsymini.jpg
As stated previously, I believe Enfold’s new preview function is reading this bit of javascript in such a way that it is causing a redirect to a full page view of the gallery, which keeps me from saving my work.
I’ve tried embedding other things: a google calendar, a Facebook post, a twitter post, a twitter feed. They all work fine, which my etsy gallery code did as well until my recent upgrade of Enfold. So it must be something about the way the snippet is structured and how it relates to enfold. (?) I am not a developer – just a well-seasoned web design amateur.
If anyone has an idea how to change the code to something more appropriate or if there is a way to know why it’s not working with the new enfold release, let me know. It’s not critical to my site but a bummer that I can’t use it.
Thank you!April 10, 2017 at 5:51 am #775257Hi,
Thank you for the update.
I was able to reproduce the issue on a text block but the script works well on a code block. Please use the code block element.
Best regards,
IsmaelApril 10, 2017 at 5:45 pm #775574Brilliant! Simple! A little embarrassing that I didn’t try it…
Thank you!April 10, 2017 at 8:59 pm #775637Hi,
Glad we could help! Please take a moment to review our theme and show your support https://themeforest.net/downloads
Thank you for using Enfold :)Best regards,
VinayApril 10, 2017 at 9:06 pm #775648Hey!
Happy we can help!
Nothing is Embarrassing at all, no worries!Thank you for your understanding
Regards,
Basilis -
AuthorPosts
- The topic ‘Element Preview Issues’ is closed to new replies.