Import/Export Plugin - will not install on IP3.9 - plugins

Maybe I am making a fundamental error, but I assume you have to install the Import / Export plugin on IP3.9 to make the zip file before you import it to the new ip4.1 site ?
The plugin will not install in IP3.9 there is an error "plugin.ini doesn't exist"
The Import / Export plugin is not in the IP3.x format
ip_plugins/group_name/plugin_name/files
so I do not see how it can be installed.
If I try exporting data from IP4.1 I get the following error message
Error:
Fatal error: Call to undefined method Ip\Page::getType() in /var/www/ip41/Plugin/ImportExport/ManagerExport.php on line 207
I am probably doing something stupid, but I cannot see what
Alan

For v3.x version you must download a 3.x branch of the plugin - https://github.com/impresspages-plugins/ImportExport/tree/3.x
For the error in v4.1 open an issue on GitHub - https://github.com/impresspages-plugins/ImportExport/issues
I hope it does make sense now.

Related

Source "#openzeppelin/contracts/token/ERC721/ERC721.sol" not found: File import callback not supported

I've imported the Open Zeppelin ERC721 token standard into my VS Code with the Solidity extension, but see the following warnings on all my OZ import statements:
Screenshot of error
Why is this happening and what is the workaround for this warning?
What I've tried:
change default workspace compiler to localNodeModule (began to throw other warnings like on the pragma solidity line)
Example of solution I've tried
Just install the Solidity+Hardhat Extension ,this will take care of the errror.
run below command
npm install #openzeppelin/contracts
Change the import line like this
import "./node_modules/#openzeppelin/contracts/token/ERC721/ERC721.sol";
You could try this solution here, the only one that helped me.
https://stackoverflow.com/a/72241149/7537543
When you compile programmatically using solc, new syntax was introduced, which you have to include in compile.js.
// New syntax (supported from 0.5.12, mandatory from 0.6.0)
var output = JSON.parse(
solc.compile(JSON.stringify(input), { import: findImports })
);
You should have a helper function for finding imports
function findImports(relativePath) {
//my imported sources are stored under the node_modules folder!
const absolutePath = path.resolve(__dirname, 'node_modules', relativePath);
const source = fs.readFileSync(absolutePath, 'utf8');
return { contents: source };
}
Unfortunately I ran into this error too & just gave the path manually:
import "/home/ev1lclow3n/node_modules/#openzeppelin/contracts/token/ERC721/ERC721.sol";
This solved my error.
(I'm a linux user so path may differ for you)
Thanks ;-)
you have to manually guide the open zepplin import to its source file if you have it downloaded in your node modules then all you have to do is to change its path like this " ../node_modules/" and also make sure to use the latest extension of juan blanco's solidity extension and solidity and hardhat extension and if you are following a tutorial your first lines of codes would probably be import "hardhat/console.sol"; all you have to do here is to manually direct only this file to its designated place and the others would do it by themselves.
What you have to do is:
If you have "Solidity by Juan Blanco" for Truffle and "Solidity by Nomic Foundation" for Hardhdat, and if you are using Hardhat, disable the one by Juan Blanco and just use the one by Nomic Foundation, it just worked for me.
Screenshot
Make sure to create a Hardhat project (npx hardhat) and install:
npm install --save-dev "hardhat#^2.12.7" "#nomicfoundation/hardhat-toolbox#^2.0.0"
npm i #openzeppelin/contracts
Ok. That was a dumb question. Two things you have to do:
(1) Install the OZ library via
npm install #openzeppelin/contracts
(2) If you see Error HH606 (i.e. project can't compile), it's likely because The Solidity version pragma statement in these files doesn't match any of the configured compilers in your config.. Ensure that your pragma version matches the version in your hardhat config.
Hope this helps.

Visual Code Studio, File Import Callback not Supported - File Source not Found

While trying to troubleshoot another issue with my project, I must've broken something along the way, but I have no idea how to fix this.
These are my import statements for the project:
pragma solidity >=0.6.6;
import "#openzeppelin/contracts/token/ERC721/ERC721.sol";
import "#chainlink/contracts/src/v0.6/VRFConsumerBase.sol";
And this is my brownie-config.yaml
depencencies:
- OpenZeppelin/openzeppelin-contracts#3.4.0
- smartcontractkit/chainlink-brownie-contracts#1.0.2
compiler:
solc:
remappings:
- '#openzeppelin=OpenZeppelin/openzeppelin-contracts#3.4.0'
- '#chainlink=smartcontractkit/chainlink-brownie-contracts#1.0.2'
But despite all this working until yesterday, trying to compile only gives me these errors:
PS C:\Users\XXX\Desktop\Project> brownie compile
INFO: Could not find files for the given pattern(s).
Brownie v1.16.4 - Python development framework for Ethereum
New compatible solc version available: 0.6.6
Compiling contracts...
Solc version: 0.6.6
Optimizer: Enabled Runs: 200
EVM Version: Istanbul
CompilerError: solc returned the following errors:
contracts/AdvancedCollectible.sol:3:1: ParserError: Source "OpenZeppelin/openzeppelin-contracts#3.4.0/contracts/token/ERC721/ERC721.sol" not found: File not found.
import "#openzeppelin/contracts/token/ERC721/ERC721.sol";
^-------------------------------------------------------^
contracts/AdvancedCollectible.sol:4:1: ParserError: Source "smartcontractkit/chainlink-brownie-contracts#1.0.2/contracts/src/v0.6/VRFConsumerBase.sol" not found: File not found.
import "#chainlink/contracts/src/v0.6/VRFConsumerBase.sol";
^---------------------------------------------------------^
How do I solve this?
I've seen some answers to similar issues referencing node.js or local copies of the stuff I'm trying to import, but isn't this command supposed to pull stuff off github?
Why is it failing to do so out of nowhere?
Install Openzeppelin at the root of your folder by using npm
npm i #openzeppelin/contracts
same thing for Chainlink
This is because the solidity extension is looking in the wrong directory.
Below step fixed the issue for me -
Change the settings in Solidity extension in VSCode.
The default settings include: "solidity.packageDefaultDependenciesContractsDirectory": "contracts" Users need to change the setting from contracts to an empty string. "solidity.packageDefaultDependenciesContractsDirectory": ""
Source - https://github.com/juanfranblanco/vscode-solidity/issues/178

eslint / babel-eslint issue with escope

Currently getting this error when i try to run eslint locally:
Error: Cannot find module 'escope'
at Function.Module._resolveFilename (module.js:455:15)
at monkeypatch (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/babel-eslint/index.js:53:26)
at Object.exports.parse (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/babel-eslint/index.js:358:5)
at parse (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/linter.js:671:23)
at Linter.verify (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/linter.js:806:27)
at processText (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:278:31)
at processFile (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:320:18)
at executeOnFile (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:655:25)
at fileList.forEach.fileInfo (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:693:13)
at Array.forEach (native)
What's weird is that im using the same linting configuration with another project, and i had no issues at all.
I'm using:
babel-eslint#7.1.1
eslint#4.0.0-beta.0
Any ideas ?
Even though I had same package.json, babel-eslint was set as "7.1.1" in one and "^7.1.1" in the other.
Basically ESLint v4 uses a new fork of escope, which was then updated on version 7.2.3 of babel-eslint.
So, adding the little ^ to my configuration fixed my problem.

Update from Qt 5.5.1 to Qt 5.6 leads to linking errors

I just try to update a project from Qt5.5.1 to Qt5.6 and now it fails during linking.
C:/Qt/Qt5.6.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lC:/Qt/Qt5.6.0/5.6/mingw49_32/lib/liblibQt5Core.a
C:/Qt/Qt5.6.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lC:/Qt/Qt5.6.0/5.6/mingw49_32/lib/liblibQt5Sql.a
C:/Qt/Qt5.6.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lC:/Qt/Qt5.6.0/5.6/mingw49_32/lib/liblibQt5Gui.a
C:/Qt/Qt5.6.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lC:/Qt/Qt5.6.0/5.6/mingw49_32/lib/liblibQt5Widgets.a
collect2.exe: error: ld returned 1 exit status
The programm compiled fine with QT5.5.1 using qbs.
Now I added the new QT Version and I get these errors.
I have no idea, why qbs adding two time the "lib" prefix, nor why qbs is trying to use it at all. This program should use the shared libraries of Qt.
Could someone give me a hint, how I can fix this? Or what the cause of the problem might be?
This issue was resolved in qbs 1.5.0.

How to use the plugin sfTCPDFPlugin?

I work with symfony 1.4, and I want to use the plugin sf sfTCPDFPlugin.
I followed step by step all the instructions, I read the question “How to generate PDF using sfTCPDFPlugin in symfony 1.4?” and answers, but when I try to generate a PDF file, I get the following error:
The server returned a "500 Internal Server Error".
In detail, I have done the following:
I installed PEAR - PHP Extension, and run OK.
I installed
successfully the plugin sfTCPDFPlugin
I downloaded and installed
the "TCPDF library"
$ symfony plugin:publish-assets
$ symfony cc
Copy the /plugins/sfTCPDFPlugin/config/pdf_configs.yml into the config folder of your application
Now I try to test the plugin, but when I want to run the function "test" that is included in the plugin, I get the following error:
The server returned a "500 Internal Server Error":
PHP Fatal error: Class 'TCPDF' not found in D:\proyectos\conflictosnew\plugins\sfTCPDFPlugin\lib\sfTCPDF.class.php on line 14
I use Wampsever under Windows XP
Any idea what could be happening?
I have found an error! The link contained in: "Download the TCPDF library" at: http://www.symfony-project.org/plugins/sfTCPDFPlugin, is incorrect, because download fonts only, not the complete library
In the following link you can find the complete library TCPDF:
http://sourceforge.net/projects/tcpdf/files/