I'm trying to call a module route from an AdminLTE submenu but it says:
syntax error, unexpected token ":", expecting "("
I'm writing at the top of file 'views/vendor/partials/sidebar/menu-item-link.blade.php' 2 lines but it is probably breaking with the first one:
#if( !isset($item['module']) || (Module::has($item['module']) )
And of course in the adminlte.php configuration file I add a 'module'=>'' to the menu item.
Am I doing something wrong?
thanks.
Hi and welcome to StackOverflow,
It seems there is an extra opening parenthesis in your code (the one before "Module").
Try with this instead:
#if( !isset($item['module']) || Module::has($item['module']) )
Thank you!
It's something I hate from PHP. I waste a lot of time with simple syntax errors.
It still doesn't work, but at least I found out it's not a Module system problem.
Related
I'm using this plugin in Wordpress to write php in a page but every time I use a for loop it gives me this error:
Parse error: syntax error, unexpected end of file, expecting ';'
How do I solve this?
This plugin does not work with loops. It is a known issue if you take a look at the reviews.
There is a plugin that I often use and that works perfectly. It is called WP-exec PHP.
Link here: https://wordpress.org/plugins/wp-exec-php/
I have a website which works fine on host, but I'm currently trying to install it on localhost.
I've downloaded everything and configured to work on localhost - Database & URL.
The problem is this error:
Unhandled Exception
Message:
syntax error, unexpected end of file Location:
C:\Program Files (x86)\EasyPHP-12.1\www\laravel\view.php(386) :
eval()'d code on line 118
And I don't know what causes it. Any solutions?
P.S. I've setup in my windows' host file 127.0.0.1 myproject.dev.
There is an error within one of your views. If there is a more detailed stack trace it should show you details of a view, although the name will be an md5() string so it's a bit hard to find. You might want to delete all compiled Blade views in storage/views and let Blade re-compile the views.
If you still get the error then check your views to make sure you have all the proper closing tags, e.g., #endif or #endforeach
Always double check your views for any syntax errors.
I've run into this same error and I was able to fix it by adding spaces to the content within an inline if statement. For example:
Experienced error with:
#if( BLAH )Output#endif
Fixed error with:
#if( BLAH ) Output #endif
This may not be a problem in all cases and it was certainly difficult to track down but it is just one example that can cause this exact error.
A variation of this problem -- I had a php block, which I'd opened with
<? as opposed to <?php worked fine on LocalHost/MAMP, but gave the above error under Nginx/Ubuntu 16.04/PHP7 (both Laravel)
you should remove a character from view file. for example my character was "," (a comma) before some "#endfor". when i remove those worked!
Fatal error: Class 'Mage_Checkout_Model_Mysql4_Setup' not found in /home/xxxxx/public_html/xxxxxx/includes/src/Mage_Core_Model_Resource_Setup.php on line 132
This is my magento site error when i am open front end and also backend. how did i am slove this error plz tel me any one
thanksenter code here
It looks like you are running Magento in 'compiled modus', but something went wrong. Have a look at /home/xxxxx/public_html/xxxxxx/includes/config.php. There are two define() statements in there. Comment them out and try again.
I cannot seem to figure out where to set the trusted_dir variable in Smarty 3. Now anytime I use a {insert name="func_name" script="thescript"} I get the error "missing script file".
Does anyone out there know how to allow this? $smarty->security is set to false.
Thank you.
EDIT: As of the posting of this question, this functionality has not been added to Smarty 3 yet, but a Smarty admin has assured me he will get onto adding the functionality ASAP. (http://www.smarty.net/forums/viewtopic.php?p=65549), so we should see it soon.
EDIT 2 The functionality has now been added to Smarty 3 and works as in Smarty 2! :-)
http://www.smarty.net/manual/en/variable.trusted.dir.php
It basically says that you have to enable security to access it.
To set the trusted_dir you would do something similiar to this:
$Smarty->trusted_dir = array(
'my_first_dir',
'my_second_dir/my_third_dir'
);
which would allow scripts from my_first_dir and my_third_dir (which is located within my_second_dir).
Can't for the life of me figure out what I'm doing wrong...
Downloaded Kohaml from http://github.com/transphorm/kohaml
Dropped it into modules/kohaml
# My Bootstrap reference
'kohaml' => MODPATH.'kohaml', // kohaml
Keep getting this error... (snapshot of the error and my modules folder)
http://wellcommentedcode.com/stack_kohaml_question/
Any suggestions on what I might be doing wrong would be highly appreciated... thanks.
It works now. Had to update the filenames like you said. Thanks again for reporting the bug. :)
Apparently a lot of the class files had names that started with a capital letter... went and lowercase them and that fixed the previous error... but all my standard views are now broken with this error.
http://wellcommentedcode.com/stack_kohaml_question/cache.jpg
Any clues?