Streaming live at 10am (PST)

Export to Wordpress Generates "Cannot read property 'frame' of undefined" error in Webflow


#1

Hello Community,

Since Webflow CMS is not out yet smile I have had to resort to an alternative. In this case it is a Wordpress blog, and I have exported my Webflow content to place in it. When I do so, I now get three JavaScript exceptions that I did not have before:

Uncaught TypeError: Cannot read property 'frame' of undefined

I will get 1-3 of these depending on if the page is loading from a clean cache or not.

It appears to occur in Webflow._ in the webflow.js script. If you are interested in seeing this in action, you can visit this page here: http://blog.developers.win/?p=244&preview=1&_ppp=dd5d5d1de8

It seems as if this has to do with transitions/animations that were previously on my page. Is there a way to turn this functionality off while Webflow loads? Please let me know if there is anything I can do to fix/debug this problem. Even a link to a resource would be greatly appreciated!

Thank you for any assistance,
Michael


#2

Hi @MikeEEE, I am not sure how much help it would be, but looking at this error in google search came up with this page and solution for another WP user: https://github.com/hlashbrooke/WordPress-Plugin-Template/issues/1


#3

Thank you for your reply @cyberdave. I have located the problem. The issue is that when Webflow exports, it assumes in some/most of its exported modules that "$" is jQuery. In my particular case, my theme uses both jQuery and MooTools, and (naturally) MooTools has been given ownership to this symbol. I have gone through and added var $ = window.jQuery to the different modules and now I am running into other issues which I am currently trying to solve, but this appears to be the root of the problem. Would this be considered a bug worth reporting?


#4

Hi @MikeEEE, I don't think this would be a bug, unless you are getting this message on the site that is also published in Webflow without using MooTools being used or using custom code. We do not have support for custom code yet.

You will likely have to check the dependencies very carefully to make sure there is no conflict between jQuery and MooTools. This article may help: http://stackoverflow.com/questions/13041420/how-to-resolve-the-conflict-between-jquery-and-mootools

I hope this helps !


#5

Alright, i fixed the problem. I would say this is an issue with Webflow export generation, but I am not the expert here and will leave it to your discretion. smile

If you load this file:
http://blog.developers.win/wp-content/themes/treeson-pro/media/js/webflow.js?ver=1.0

You will see that line 3975 now reads:

var $ = window.jQuery;

However, it was generated as:

var $ = window.$;

Adjusting it to its current, deployed value fixed the issue. I would say that this is a bug, but once Webflow CMS emerges to smash the gooey crap out of Wordpress this will be a non-issue. stuck_out_tongue


#6

Hi @MikeEEE, it definitely sounds like strange behavior for sure ! If you export the site from webflow, without making any modifications to the exported code, do you get the errors?

If so, then there may be a bug there. Let me know if you can reproduce this on the clean exported site from Webflow, that way we can check if there is some problem with the export.

The "$" is shorthand for the jQuery library that Webflow loads before the body. It might be causing an issue when you do the integration, but I would not consider this a bug.

Regards,
Dave


#7

Correct, because in my (special) case my Wordpress theme is using MooTools, which is assigned to $ when that line of code executes. $.tram does not exist in MooTools, so it fails in my case when it is accessed.

The amount of people that will be facing this issue is negligible, so it is definitely an edge case, but it is something to be aware of, IMO. If anything, I hope this thread will serve as guidance for anyone else who encounters this issue in the future. From my perspective, I consider this resolved and need no further assistance. Thank you for your time and assistance, @cyberdave!


#8

Right on @MikeEEE, your points are for sure valid ! This is good info to keep around smile Soon, with Webflow CMS, I am hoping you will never have to use WP again smile


#9

Man you are right about that, @cyberdave! I just saw the video and it looks incredible! Webflow for life. I just wish it was possible to tie it into .NET technologies somehow, maybe as a .NET client designer. But alas C# and JavaScript are oil and water, hence the reason for my site (so we can get that changed). smiley


#10

Hi Mike ! An API will be coming ! I do not have an ETA, pricing or feature specs, but when it arrives, it will open up new possibilities :smile:


#11

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.