- Author Posts | Subscribe Add this topic to your favorites (?)
- Author Posts
- August 30, 2012 at 4:45 pm #17913
- DaveLegassick
- Hi,
- I've received no reply in the other thread discussing this issue, but seeing as it drifted from the original question I thought it fair enough to start a specific thread for this.
- The other thread is here: http://wp-types.com/forums/topic/how-to-use-a-beta/
- As I outline in this thread Views is still causing conflicts with the Gravity Forms jQuery Date Picker and the one used in WordPress and available in the CPT view through the back end. The problem, as I detailed, is this:
- "With either version of Views installed (1.1.1 or 1.1.2b) the Gravity Forms date picker will not render correctly (the month and year drop downs appear with the next and previous arrows each side and a small rectangle to the right, no actual calendar) on the front end form but deactivating Views fixes this issue.
- The date picker on the custom post type edit screen in the WordPress admin renders incorrectly, just as described for the front end form, uninstalling Views has no effect on this.
- With Views 1.1.1 installed Gravity Forms with a date picker will not preview, generating the Java Script error I listed above, this is fixed in 1.1.2b and the preview works correctly and the date picker works in the preview."
- The Javascript error mentioned is this:
- "ReferenceError: wpv_calendar_image is not defined [http://localhost/wordpress/wp-content/plugins/wp-views/embedded/res/js/wpv-date-front-end-control.js?ver=1.1.1:24"
- Do the dev's have any thoughts on this? Using the latest beta hasn't helped, but could I perhaps enqueue or remove the specific scripts on loaded the forms as a temporary fix whilst you guys work on a long term solution?
- Any guidance would be much appreciated as this becoming the bane of my project at present.
- Apart from that loving everything you're offering!
- Thanks in advance.
- August 31, 2012 at 4:56 am #17938
- luoy
- Hi DaveLegassick,
- Thanks for your feedback, Please try our latest version of Views: 1.1.2, you can download here:
- http://wp-types.com/download/views/
- Let me know if there is still conflicts problem.
- Regards
- Luo
- August 31, 2012 at 9:15 am #17955
- DaveLegassick
- Just installed it and there's no change I'm afraid. In light of that any other ideas? As I mentioned above the preview function from Gravity Forms is working after moving to Views 1.1.2, and in case you're not aware this feature generates a demo of you form in an isolated environment from the rest of your site so it doesn't load any of the scripts or templates of the rest of the site and seeing as in 90% of cases Views would not be required when Gravity Forms is being used do you know which scripts we can prevent loading from Views (a code sample would be great) to try and prevent this from happening.
- Thanks for getting back to me,
- Dave.
- September 4, 2012 at 7:16 am #18126
- DaveLegassick
- Any updates on this? I've tried what you suggested and it hasn't worked, any suggestions?
- September 4, 2012 at 7:53 am #18130
- DaveLegassick
- Well I've got an update.
- I know a lot of people are having trouble with this and no one has had a proper answer that's managed to fix this so I can provide a big clue.
- *** Please note this information is a work around for the Views issue I have discussed above and does still not fix the Types back end issue although it is the same fault, see below for the Types fix ***
- The fault lies in a style not a script. I compared the working page source from a form preview and a not working live page and the sources revealed something interesting. The only difference between them with an relation to wp-views was the inclusion of the CSS files, and when you look at the error again with this in mind it makes a lot of sense, after all if it was a scripting error surely it wouldn't show at all not just badly. With this in mind I looked at the three CSS files included and these were:
- wpv-pagination.css
- datepicker.css
- wpv-views-sorting.css
- From this list it was fairly obvious that fault may well lie with the datepicker.css file so I did a search through the wp-views folder and found there is only one reference to this file. This is in <strong>wpv.class.php</strong> where it is enqueued on line <strong>112</strong>, commenting out this line fixes the problem.
- This returns me to my original question from this post that preventing or undoing this enqueueing fixes the problem. I'm aware this may only be a problem when other plugins are enqueueing a date picker before hand but I'm betting a lot of people do.
- *** Types ***
- The same is true of the date picker when used in the WordPress backend by Types, simply find the datepicker.css reference and commenting it fixes it. It's a little more complicated in Types but only due to the fact it's included via an array, simple comment lines <strong>75 – 79</strong> in the file <strong>date.php</strong> in the types folder and it works correctly.
- I'm hoping now someone has actually pinned the problem down the dev's can issue a simple fix, perhaps as simple as checking the page when rendered only enqueueing the file if no other plugin is enqueueing the date-picker.js script?
- Hope this helps people struggling with this issue.
- Looking forward to hearing from the dev's on this one.
- September 4, 2012 at 11:20 am #18147
- luoy
- Hi DaveLegassick,
- Since I don't have a copy of latest Gravity Forms copy, I can not duplicate the same problems in my localhost,
- But I have put it in our to-do list, let our developer check it,
- And could you invite Gravity Forms developer into this issue, this can help solve it more quick.
- Regards
- Luo
- September 4, 2012 at 2:23 pm #18160
- DaveLegassick
- I have posted a request in their forums here:
- http://www.gravityhelp.com/forums/topic/date-picker-conflict-with-wp-views-request
- Hope you guys can get this sorted out between yourselves as both plugins are amazing.
- I'll mark this topic as resolved as it can go no further for now and I have posted a work around for the mean time.
- Viewing 7 posts - 1 through 7 (of 7 total)
- This thread is marked as resolved. Support staff may not reply to more posts. If you need further assistance from our staff, please start a new thread.