Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
if you have no code in the input form
there is a error
Fatal error: Call to a member function init_display() on a non-object in /var/www/dev6/sites/views.dev/modules/views-HEAD/includes/admin.inc on line 798
Comment | File | Size | Author |
---|---|---|---|
#10 | views-440676-4.patch | 1.11 KB | tobiasb |
#7 | views-440676_0.patch | 1002 bytes | dawehner |
#5 | views-440676.patch | 1.28 KB | dawehner |
#1 | views-440676.patch | 6.41 KB | dawehner |
Comments
Comment #1
dawehnermh i don't like this patch, but it solves the issue.
there has to be a much easier way to do it, this is not a good style i think
PS: thanks Spartacus for finding the issue.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedWhat if we just set the textarea to #required TRUE?
Comment #3
dawehnerthe Problem is there that the validate function executes the code and does all stuff see
And validate functions are called if there is something in the view import textarea or not, this was my first try to fixing it, perhaps i did something wrong...
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedHm ok. Just exit the validation function early if the textarea is empty?
Comment #5
dawehnerthx wise merlin!
Comment #6
stBorchertIf you throw an error if the textarea is empty you should set it to required, too.
Apart from that: +1 and works.
Comment #7
dawehnerbut then i don't have to throw the error, because required throws a error too.
and this message is rather hard to understand
but here is the patch.
thx for the review!
Comment #8
larsdjohnson CreditAttribution: larsdjohnson commentedI had this problem for a different reason. This comes up first on Google search for the error, so I'm going to put my problem here for anyone else who finds this:
If you have TinyMCE enabled for that views import text box, it formats your code funny, and even if you use the HTML button in TinyMCE to paste your code, it still throws "p" and "/p" tags around your text.
So, you have to disable TinyMCE for that page in your TinyMCE configuration.
Comment #9
dawehnerYou cannot have this problem together with the wysiwyg-API Module
There the editor is only used for fields with a input filter attached, and its definitve not one for this textarea.
you have to disable the editor, this cannot/shouldn't by solved by views, thats my personal oppinion
Comment #10
tobiasbComment #11
tobiasbmy smaller version :D its time to commit this quick fix
Comment #12
merlinofchaos CreditAttribution: merlinofchaos commentedWorks for me. Committed!