Giter VIP home page Giter VIP logo

Comments (25)

jsaugustyn avatar jsaugustyn commented on June 1, 2024 1

SUCCESS!!!! Thanks - get some sleep!

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

I'm synced with the dev branch, in case that matters.

from adventurelookup.

burnhamrobertp avatar burnhamrobertp commented on June 1, 2024

@jsaugustyn cmfcmf's migrations which are designed to only work on production are causing you errors. Check doctrine docs on how to only run migrations up to a certain version. I'm pretty sure cmfcmf's "bad" one is the very last one.

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

OK, cool, thanks @Harkenn. I've had to step away for a few days due to work demands. How close are we on refactoring the models?

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

I've tried rolling back to previous migrations, and am now getting errors on reindexing elastisearch:

Base table or view not found: 1146 Table 'adl.edition' doesn't exist

This is obviously related to the model refactoring. Suggestions are welcome, but I'll also dig around the elastisearch docs. It would be worth updating the README to note that the installation instructions won't currently work, and will be updated post-refactor.

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

Incidentally, if I roll back to the previous migration (20170721075547) I get the following errors on reindexing elastisearch:

[Doctrine\DBAL\Driver\PDOException]                                                  
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.part_of' in 'field list'

and

[PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.part_of' in 'field list'

These are both SQL errors, FWIW.

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

Progress! If I run the very last migration (20180000000000) the initial elastisearch reindex works. However, I am unable to populate the database with dummy data. The current instructions in the README are to run:

php bin/console doctrine:fixtures:load --fixtures src/AppBundle/DataFixtures/ORM/TagData.php --fixtures src/AppBundle/DataFixtures/ORM/RandomAdventuresData.php -n

TagData no longer appears to exist - I think it was used in old dynamic model. Also, it is no longer RandomAdventuresData, but RandomAdventureData.

Fixing all that, I now get:

[Symfony\Component\Debug\Exception\ContextErrorException] Notice: Array to string conversion

I'll keep trying to fix this. If I can figure it out I'll update the README in a new pull request.

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

OK, so I tried running my own fork that does not include any of the model refactoring and it works as expected. @cmfcmf and @Harkenn, am I better off waiting to do any additional work until the refactoring is totally complete and merged into the dev branch? I could keep chasing errors, but it might be simpler to wait until we are back to a stable branch.

from adventurelookup.

cmfcmf avatar cmfcmf commented on June 1, 2024

Hey @jsaugustyn, sorry for all the confusion. Here are a few things:

  • You read the master's README. The command to load fixtures has already been adjusted in the dev's README.
  • Make sure to run php bin/console app:elasticsearch:reindex after loading fixtures.
  • Don't run the migration Version20180000.... It is not designed to run locally, but only on the live sites. Execute php bin/console doc:migr:migr Version20170724185627 and replace the version by the name of the last migration before the Version20180000... fixture . Maybe I shouldn't have made it a migration but rather a command, to avoid the confusion 😕
  • EDIT: The weird migration causing trouble is extracted to a command (#72), you shouldn't have any trouble running migrations again!

To conclude:

  1. Make sure your current fork is running and working.
  2. Pull changes from dev
  3. Execute php bin/console doc:migr:migr Version20170724185627
  4. Execute php bin/console doc:migr:migr
  5. Execute php bin/console app:elasticsearch:reindex

Let me know if it works. If it doesn't, another option is to drop all tables from the database and continue at step 2 above.

from adventurelookup.

burnhamrobertp avatar burnhamrobertp commented on June 1, 2024

Technically you didn't make it a fixture, you made it a migration, but either way, you've changed that now.

from adventurelookup.

cmfcmf avatar cmfcmf commented on June 1, 2024

Technically you didn't make it a fixture, you made it a migration, but either way, you've changed that now.

Thanks, always mixing the two terms up. Updated my comment above.

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

This isn't working. Here is exactly what I have done:

  1. I forked this repository to jsaugustyn/AdventureLookup
  2. I cloned jsaugustyn/AdventureLookup locally
  3. I ran through the old setup instructions - everything works and the app runs
  4. I set this repository as the remote upstream and did a git fetch upstream
  5. I switched to a new branch based on upstream/dev: git checkout -b newmodels upstream/dev
  6. I relaunched vagrant with vagrant up and vagrant ssh
  7. I ran php bin/console doc:migr:migr and got the following error:

PHP Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException: You have requested a non-existent parameter "google_analytics_code". in /vagrant/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:100 Stack trace: #0 /vagrant/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php(56): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->get('google_analytic...') #1 /vagrant/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(217): Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag->get('google_analytic...') #2 /vagrant/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(187): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->resolveString('%google_analyti...', Array) #3 /vagrant/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ in /vagrant/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php on line 100

  1. Attempting php bin/console app:elasticsearch:reindex generates the same fatal PHP error.

from adventurelookup.

cmfcmf avatar cmfcmf commented on June 1, 2024

Ahh! Sorry. Another PR introduced a new configuration variable. Run composer install and hit enter when asked for google_analytics_code.

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

OK, solved that problem. But now php bin/console doc:migr:migr throws:

Migration 20180000000000 failed during Execution. Error Number of tag names changed!
[Doctrine\DBAL\Migrations\AbortMigrationException] Number of tag names changed!

It appears to be running the 20180000000000 migration. Do I need to add a version to php bin/console doc:migr:migr?

from adventurelookup.

cmfcmf avatar cmfcmf commented on June 1, 2024

I've just noticed that the Version20180000000000 appeared again due to merging. Sorry about that. Could you merge my PR which removes it once more, please? Then pull changes from dev for the last time and you should be up and running!

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

OK, I think it's working now. Just to confirm - I am no longer seeing any metadata (setting, edition, etc) for the random adventure data and there are no filters displaying. Is that as it should be?

from adventurelookup.

cmfcmf avatar cmfcmf commented on June 1, 2024

If you generate the random adventures again, their data should show up once more.

php bin/console doctrine:fixtures:load --fixtures src/AppBundle/DataFixtures/ORM/RandomAdventureData.php

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

That gives the following error:

[Symfony\Component\Debug\Exception\ContextErrorException] Notice: Array to string conversion

from adventurelookup.

cmfcmf avatar cmfcmf commented on June 1, 2024

After re-indexing, the errors should be gone too!

php bin/console app:elasticsearch:reindex

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

Nope. I re-indexed, then tried running this again. Same error, and still no metadata or filters.

from adventurelookup.

cmfcmf avatar cmfcmf commented on June 1, 2024

I just reproduced the bug locally. Try changing line 80 of the RandomAdventureData fixture to
->setFoundIn($faker->catchPhrase), then

php bin/console doctrine:fixtures:load --fixtures src/AppBundle/DataFixtures/ORM/RandomAdventureData.php
php bin/console app:elasticsearch:reindex

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

That's how line 80 is already

from adventurelookup.

cmfcmf avatar cmfcmf commented on June 1, 2024

I'm so sorry - I meant line 81. Looks like I'm too tired to think.

->setPartOf($faker->boolean() ? $faker->catchPhrase : null)

from adventurelookup.

burnhamrobertp avatar burnhamrobertp commented on June 1, 2024

@jsaugustyn closable?

from adventurelookup.

jsaugustyn avatar jsaugustyn commented on June 1, 2024

Yeah, I'll close #71

from adventurelookup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.