Symfony ICU Issue, routes using locale different than EN will fail - symfony

After installing Yosemite and a new version of MAMP
and when I'm trying to execute
domain/app_dev.php/es/venues/3/show
This route is rendering a form containing a language type field, so it's requiring ICU.
being 'es' the locale i get errors. If I changed it to 'en' there's no problem.
The errors are:
[1/2] ResourceBundleNotFoundException: The resource bundle
"/Users/a77/Documents/DEV/UVox
Com/vendor/symfony/icu/Symfony/Component/Icu/Resources/data/lang/root.php"
does not exist.
[2/2] Couldn't read the indices [Languages] from
"/Users/a77/Documents/DEV/UVox
Com/vendor/symfony/icu/Symfony/Component/Icu/Resources/data/lang/es.res".
The indices also couldn't be found in the fallback locale(s)
"root.res".
My symfony version is 2.5, I'm running the MAMP PHP 5.5.10.
I updated dependencies via composer, including "symfony/intl": "*",
I have followed several webs in order to install icu and intl via pecl. But still get the error. I don't know how to check if the installations or the configs are ok. Maybe you can let me know how to test both via terminal and let you know what is the result...

This is because you are trying to get resources only for language es. But now (from the moment of importing to Symfony icu data) you need to get language resources via language and country codes es_ES.

You may not be able to just simply activate intl.so after the Yosemite update. I solved the issue installing intl.so following an excellent article by Danilo Braband http://dab.io/posts/getting-started-with-symfony-on-yosemite.html

Solved updgrading to Symfony 2.5.6

Related

Drupal 9: dd(), ddm() or drupal_dump() missing

I've installed D9 plus devel and created a custom theme (with all the necessary files, works nicely) and enabled all the necessary dev-centric settings, but it seems that the necessary functions like dd() or drupal_dump() are not found. I've already checked that everything related to the devel module (devel, devel generate, devel web profiler) is enabled in my Drupal.
Any help appreciated!
drupal_dump(), alias dd(), is not provided by devel, but by another module named twig_tweak. It requires Symfony's VarDumper component to work. You can install them using composer :
composer require --dev symfony/var-dumper
composer require drupal/twig_tweak
drush en twig_tweak
ddm() doesn't print anything to the screen but outputs a variable to a file named drupal_debug.txt in the site's temp directory.
More on devel functions here.
Long story
In drupal 7.x and up to version 8.6.0, dd() was indeed provided by the devel module, but it was an alias for drupal_debug() (d7) and DevelDumperManager::debug() (d8), but it has been deprecated and replaced by ddm() since 8.6.0, because Symfony's VarDumper component already has a function named dd().
Now to add further confusion, twig_tweak is using the alias dd() for drupal_dump() (source).
Even if both functions end up calling Symfony's VarDumper::dump(), Symfony's dd means "dump and die" and is meant to immediately ends the execution of the script after dumping the variables, whereas twig_tweak's drupal_dump/dd does not.
The exact same thing happens in Laravel : it uses Symfony's VarDumper and overrides its dd function with a function that doesn't behave the same, instead of using a different name.

Instalation of Intershop 7.9 failing on missing version for demo cartridges

I'm trying to install a demo shop of Intershop version 7.9 but i'm failing to get it working. When I run "gradlew deployServer" I'm getting an error on all dependencies of the first demo shop cartridge:
Could not resolve all dependencies for configuration ':app_sf_responsive:compile'.
Could not resolve com.intershop.business:ac_ecircle:.
Required by:
nl.test.testproject:app_sf_responsive:1.0.0-LOCAL
No version for module 'com.intershop.business:ac_ecircle' in project properties and no version declared in dependency. Consider adding a version or filter property to 'C:\projects\test7.9\projects\testproject\gradle.properties'
I have followed the complete Intershop manual Setup CI Infrastructure but there is one point I don't know exactly what to do, that's with the new versioning plugin.
It is in chapter 6.2.5, any one have an idea how to configure that?
After loads of tinkering and mails back and forth with Intershop support I found a solution.
My alterations are in section 7.2.4 of the Setup CI Infrastructure of Intershop:
https://support.intershop.com/kb/index.php/Display/279D85#Cookbook-SetupCIInfrastructure-CorporateArtifactsRecipe:SetupCIBuildforCorporateArtifacts
I Made sure the corporate distribution is unique since I have more that 1 Intershop installation. Otherwise the upload to Nexus(in my case) will still fail.
In the build.gradle of the corporate distibution folder added disableSCM = true in the scm.version section. It now looks like this:
scm {
version {
type = 'threeDigits'
increment = 'MAJOR'
patternDigits = 1
disableSCM = true
initialVersion = '2.0.0'
}
}
If this is not added I got a bad request httpstatus 400 from Nexus because it tried to upload it as a snapshot while the distribution repository is a release repository.
Another problem is the distributionURL in the project/gradle/wrapper/gradle-wrapper.properties
All Nexus repository URL's are build up with < repoBaseURL > + repositories/snapshots, but the distributionURL is missing the repositories part.
After applied those changes it worked for me.

"Modules are Outdated" Error

I get this error when I create a new module:
"Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Sangeeta_Octan data: current version - none, required version - 0.0.1";i:1;s:1781:"#0
I searched on google and found no solution other than reinstalling Magento. Such as:
version has been changed from "2.0.0.0" to "2.0.0" during development,
so update tool can't recognize that "2.0.0.0" <= "2.0.0". Please,
re-install your application from scratch to get latest version. `
Do I have any options apart from reinstalling?
Change the setup_version of your module (Sangeeta_Octan) in
app/code/Sangeeta/Octan/etc/module.xml. Try a different version
name like setup_version="2.0.1" or setup_version="3.0.0"
Run bin/magento setup:upgrade
If that doesn't work, disable your module by changing your module name in app/etc/config.phpfrom Sangeeta_Octan => 1 to Sangeeta_Octan => 0. Then run bin/magento setup:upgrade
I hope below solution also solve your problem.
https://magento.stackexchange.com/questions/112293/mysql-error-and-possible-duplicates-running-bin-magento-setupupgrade-after-rena/112299#112299
in mysql find the table setup_module It will have 3 fields. Find the NULL values in data_version & have them match the schema_version
As an alternative, you can access your magento database and look at the table setup_module
You will see a list of all installed modules and you can manually set the schema/data version numbers here.
Delete the offending rows from the setup_module table (if they are there) and run the command bin/magento setup:upgrade from your Magento 2 root directory.
This is happens because of something wrong while running "bin/magento setup:upgrade" and the data_version in Module versions registry is null. It is loaded from DB, We can just proceed by manually changing it in db.
Go db via php myadmin and check "setup_module" table, the
data_version which are mentioned "null".
Login to Mysql database => then update table setup_module of the "data_version" column same as "schema_version"

FatalErrorException: Error: Class 'ResourceBundle' not found

I installed and configured FOSUserBundle, SonataAdminBundle, SonataUserBundle, SonataMediaBundle correctly as written in here http://tech.dupeu.pl/2013/07/symfony-2-3-sonataadminbundle-sonatamediabundle-sonatauserbundle-and-fosuserbundle-a-good-project-base/ and with some research it's fine and I already can create a user, a superadmin etc..
Also Media ans Groups features works correctly ! I have a problem when tryin to add a user in the Admin Dashbord, I donnow exactly what it is about .. I searched on forums and on stackoverflow and it seems that it has a relation with SonataIntlBundle so I reinstalled it and I activated intl extension in my WampServer (Windows 8) but it's not working anymore ..
This is the error ( FatalErrorException: Error: Class 'ResourceBundle' not found in C:\wamp\www\project\vendor\symfony\symfony\src\Symfony\Component\Intl\ResourceBundle\Reader\BinaryBundleReader.php line 32 )
Solved
I fixed the problem by installing symfony/intl with composer : I added this "symfony/intl": "2.6.*#dev" to requiere section then I lunched the composer update command and now it's working !
You can check this link http://symfony.com/doc/current/components/intl.html for more informations!
ResourceBundle is a dependency of intl extension, so your intl or ICU version are wrong. Search for the right version (Thread Safe or not, 32bit or 64bit).
On WAMP is hard to found the right version. If I remember, when I had this issue, I had to downgrade my WAMP version.

Version information on Xserver modules

I am trying to find a tool that will extract the module version information (a part of the module record) fron an Xserver module. For example, in the Xorg logs I can see the following information for the librecord module in my Xorg.0.log file...
[ 39.892] (II) Loading /usr/lib/xorg/modules/extensions/librecord.so
[ 39.905] (II) Module record: vendor="X.Org Foundation"
[ 39.905] compiled for 1.9.0, module version = 1.13.0
[ 39.905] Module class: X.Org Server Extension
[ 39.905] ABI class: X.Org Server Extension, version 4.0
Is there a tools that would allow me to easily extract the aforementioned information. Sometimes you can use modinfo on the module and that will have version information, but that does not always work. The only consistent way I know of now is to parse the xorg log file. Thanks.
Yes, there is and you can also try to write a small one.
http://gitorious.org/xdriverprobe
The problem is that xdriverprobe won't compile on newer servers since I didn't update it to the newest ABIs. Also, xdriverprobe is only used for video drivers, but it can be adapted to be used on other modules. The main source code file (xdriverprobe.c) has less than 500 lines, so you can easily learn by reading it.
It works in Ubuntu 11.10... ./xdriverprobe -o moduledata gives the information you want.
Look at its source code. It does:
dlopen() the module
find a symbol called modulenameModuleData (if your module is called modulename)
that symbol is a XF86ModuleData* See /usr/include/xorg/xf86Module.h
check its member named vers
Spend a few hours and you'll be able to write a very tiny code that does what you want.
More information: http://www.xfree86.org/current/DESIGN17.html#65 (very old document, but most of what's written there is still true today). If you're not happy with that document, you have to read the Xorg source code.
Happy hacking!

Resources