Parse error: syntax error, unexpected ''supplier_rule'' (T_CONSTANT_ENCAPSED_STRING), expecting function (T_FUNCTION) - prestashop-1.6

Resetting CleanURL Prestashop Module has lead to HTTP ERROR.
Parse error: syntax error, unexpected ''supplier_rule''
(T_CONSTANT_ENCAPSED_STRING), expecting function (T_FUNCTION) in
/home/mbawithf/public_html/mbawithfun.cu.cc/override/classes/Dispatcher.php
on line 4
Now I can not even access backend. I just tried to deleting module from FTP... still didn't work. Any solution?

Delete the Dispatcher file in override folder, or comment the function that includes that line.
Don't forget to delete the cache/class_index.php so Prestashop recreates that file.

PrestaShop tries to manually copy class methods to \override\classes* files, and sometimes the lines miss-match or the line break are wrong, and the end result is incorrectly copied lines which cause syntax errors. That happens both on installation and uninstallation. Basically, you then have to manually fix/remove syntax errors from overridden class files.
What you need is to log on to FTP server and edit this files - fix syntax error.
EDIT:
If you had uninstalled the module, then you should replace the contents of this file with:
class Dispatcher extends DispatcherCore
{
}
Please check that the are no public function ... because if there is, it means that other modules may have inserted their functions here. If there isn't any, then it's safe to reset the file with the code above.

Related

What is the purpose of foundation.dart in Writing and Reading Files using path_provider plugin?

I am trying to understand how to read and write data on text files using path_provider plugin.
I've read an example on how to use it on Flutter from here. Then I saw this line of code which I don't understand:
import "package:flutter/foundation.dart";
I tried to comment it out from the code and ran "flutter run":
//import "package:flutter/foundation.dart";
And to my surprise, it ran perfectly. Although it raised some errors like:
E/DartVM (23127): 'dart:core/runtime/libintegers.dart': error: Unexpected tag 0 (Nothing) in ?, expected expression
E/DartVM (23127): ../../third_party/dart/runtime/vm/compiler/intrinsifier.cc: 153: error: Intrinsifier failed to find method ~ in class _Smi
and
E/DartVM (23237): 'dart:typed_data': error: Unexpected tag 15 (DirectPropertyGet) in ?, expected type
E/DartVM (23237): ../../third_party/dart/runtime/vm/compiler/intrinsifier.cc: 153: error: Intrinsifier failed to find method get:x in class _Float32x4
But it ran well. I don't know why. When should I use it? What method from the code did the foundation.dart was used?
I would appreciate any kind of enlightment. Thanks in advance.
[UPDATE]
I think I understand why foundation library was used in the example code. Maybe because the example code used the "required" constant from the foundation library.

Nitrogen wf.hrl file is deleted with a warning

I am using a slim_version of cowboy, I have also tried that on slim_yaws on nitrogen. What puzzles me is the abrupt deletion of the wf.hrl file by the VM. I do not understand what causes this!! Here is what appears in the console.
Warning. Deleted "wf.hrl" file included in existing src files: [list_module_files_with_the_wf.hrl_include >]
I am puzzled because the module which use the wf.hrl cannot compile after its deletion. I have experienced it on slim_cowboy and slim_yaws. It is abrupt!

Emacs css-mode not loading

I'm not sure why, but on my Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.4) css-mode is not loading and with M-x css-mode gives this error in Messages:
Symbol's function definition is void: apropos-macrop
or
File mode specification error: (void-function apropos-macrop)
my css file (ending in .css) is in Fundamental. I just tried it on a 23.1.1 and CSS mode comes up and works fine.
Update: Traced problem to my autoloads. i.e., comment out autoloads
;(load "~/modes/autoloads" 'install)
and the problem goes away. I'm not sure what to hack with an autoloads file. Any way to "step" through an autoloads? Here's my autoloads: http://gmcongo.org/temp/autoloads
In Emacs 24.4 and the bleeding edge versions leading to it (like 24.3.50+), apropos-macrop has been replaced by macrop. In css-mode.el, replace the call to apropos-macrop with a call to macrop and the error goes away.
Building upon the existing correct answer, you can create an alias in your ~/.emacs instead of editing css-mode (if for example, it came in a package with your distribution):
;; For css-mode, temporarily.
(defalias 'apropos-macrop 'macrop)

HDF5 example not working

I tried building the first example here and got errors. Right on the first line there's a missing include statement, but I managed to figure out it should be
#include "hdf5.h"
But even after fixing that I got more errors:
$ h5cc ./example1.c
./example1.c: In function ‘main’:
./example1.c:66:4: error: too few arguments to function ‘H5Dcreate2’
In file included from /usr/include/hdf5.h:27:0,
from ./example1.c:6:
/usr/include/H5Dpublic.h:104:14: note: declared here
Any idea how to solve it?
The example code was written for release 1.6 of hdf5, and as such will simply not compile on a 1.8 release without modification.
If you want to get the code to work on 1.8, you need to enable 1.6 compatibility, which means passing in the flag:
-DH5_USE_16_API
to the h5cc command line like:
h5cc -DH5_USE_16_API ./example1.c
and it should compile correctly; otherwise you will have to rewrite the code to make use of the 1.8 API.

lua lxp The specified module could not be found

I'm putting together an application that uses the moon soap, but when you run it reports the following error :
C:\Lua\5.1\lua.exe: error loading module 'lxp' from file 'C:\Lua\5.1\clibs\lxp.dll':
The specified module could not be found.
How do I fix this ?
This is not a "file not found" error. Note that the message stated that it tried to load the module "lxp" from a file ('C:\Lua\5.1\clibs\lxp.dll') but it didn't work. Maybe the file doesn't have a luaopen_lxp C function (which might be called by loadlib)... Or maybe you are not loading it with require...

Resources