Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netbeans error in editor #54

Open
r-da opened this issue Jan 13, 2017 · 5 comments
Open

Netbeans error in editor #54

r-da opened this issue Jan 13, 2017 · 5 comments
Assignees

Comments

@r-da
Copy link

r-da commented Jan 13, 2017

Hello,
I'm not sure this is a problem with Cakephp3 plugin, but I have the following issue.
If i have javascript code in a ctp file, marked with cakephp Html->scriptStart and scriptEnd, I have errors highlighted by netbeans (see attached screenshot).
Is there a way to avoid this and convince netbeans to parse the javascript correctly?

netbeans-bug

@junichi11 junichi11 self-assigned this Jan 13, 2017
@junichi11
Copy link
Owner

Unfortunately, it is not a bug. It is not a correct syntax of PHP. So the IDE recognizes it as an error.

But I may be able to improve it a bit. I cannot promise to do it soon, sorry.

@r-da
Copy link
Author

r-da commented Jan 16, 2017

So this means that it's not possible to instruct Netbeans that Html->scriptStart and scriptEnd are delimiters for javascript?

@junichi11
Copy link
Owner

So this means that it's not possible to instruct Netbeans that Html->scriptStart and scriptEnd are delimiters for javascript?

Yes, users cannot do it by default. But as I wrote the above, maybe, it can be improved. (Sorry if it is not possible)

@acomerlatto
Copy link

acomerlatto commented Jan 19, 2018

You can resolve that with this trick, at the end of the file put that

<?= $this->Html->scriptStart(['block' => true]); ?>
/*<script>*/
[insert you code here]
<?= $this->Html->scriptEnd(); ?>

@r-da
Copy link
Author

r-da commented May 8, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants