Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

~~Upgrading~~ Transfering an »official« 2.7.10 installation #6

Open
animaux opened this issue Sep 13, 2021 · 11 comments
Open

~~Upgrading~~ Transfering an »official« 2.7.10 installation #6

animaux opened this issue Sep 13, 2021 · 11 comments

Comments

@animaux
Copy link

animaux commented Sep 13, 2021

When trying to upgrade an existing installation of 2.7.10, I get redirected to an install screen instead of an upgrade screen.

I tried updating the »old-fashioned« way, by replacing all files/folders except extensions, manifest and workspace with the ones from this repo.

@animaux animaux added the bug label Sep 13, 2021
@pointybeard
Copy link
Owner

pointybeard commented Sep 14, 2021

This is a drop-in replacement, so if you're already on 2.7.10 there isn't an "upgrade" path, just switch out the contents the "old-fashioned" way. 😄

@pointybeard pointybeard removed the bug label Sep 14, 2021
@pointybeard
Copy link
Owner

Worth mentioning that you'll likely have issues with missing fields. Make sure you installed the classic fields extension.

@animaux
Copy link
Author

animaux commented Sep 14, 2021

This is a drop-in replacement, so if you're already on 2.7.10 there isn't an "upgrade" path, just switch out the contents the "old-fashioned" way. 😄

Thanks, yes this is what I did. So the problem was to copy the install folder too, I guess.

Without that I get:

Error

Could not locate Symphony configuration file. Please check manifest/config.php exists.

Is that because of the »JSON formatted config« you mention in the readme? Does the config file need to be converted to JSON by hand?

@pointybeard
Copy link
Owner

Oh, right. Good point. I didn't think about that. I will need to have a migration for that! In the meantime, take a look at https://github.com/pointybeard/symphonycms/blob/master/install/includes/config_default.json and see if you can manually create your config.json file from the values in your config.php file.

@animaux
Copy link
Author

animaux commented Sep 14, 2021

Thanks! Will give it a try!

@animaux
Copy link
Author

animaux commented Sep 14, 2021

OK, I got it running with a reduced set of config options, since I apparently introduced some errors … first extension incompatibility I am encountering seems to be limit_section_entries.

Symphony Notice: Undefined index: page

An error occurred in /Volumes/GOLD/jobs/~websites/rendezvous-ext/extensions/limit_section_entries/extension.driver.php around line 195

 if (in_array($callback['context']['page'], array('new', 'edit'))) {

PS. The former error message should then of course say Please check manifest/config.**json** exists ;)

@animaux
Copy link
Author

animaux commented Sep 14, 2021

And entry_nav . With the same reference to page. Maybe this is because I haven’t been able to active the classic_fields extension yet.

@animaux
Copy link
Author

animaux commented Sep 14, 2021

Sorry for spamming this. After deactivating the two extensions and trying to activate the Classic Fields extension I get this notice:

Faild to enable field 'author'. Returned: Symbolic link '/…/extensions/classicfields/fields/field.author.php' could not be created. Returned: Failed to run command. Returned: ln: illegal option -- - usage: ln [-Ffhinsv] source_file [target_file] ln [-Ffhinsv] source_file ... target_dir link source_file target_file

I’m clueless now.

@pointybeard
Copy link
Owner

So, Classic fields generates some symbolic links inside of the /symphony folder in case there are extensions that directly include a field file. If the symbolic link isn't there and they try to do this, an error will be thrown.

Based on that error, it seems that the ln command being run behind the scenes is using options that aren't available on your specific version. It is likely a mac vs linux issue.

The culprit is my helpers-functions-files helper library. The specific code is here https://github.com/pointybeard/helpers-functions-files/blob/80b588832292699b501a868293331b319cf337bc/src/Files/Files.php#L46

        Cli\run_command(sprintf(
            'ln --verbose --symbolic %s %s %s',
            true == Flags\is_flag_set($flags, FLAG_FORCE)
            ? '--force'
            : null,
            $target,
            $name
        ), $output, $error);

Mac does not support long options (i.e. --verbose, --force, and --symbolic). Instead, it expects ln -s -f -v rather than ln --symbolic --force --verbose.

I have patched the library to use short options. Run composer update on the extension/classicfields folder to ensure this change comes across. You should see it update from 1.0.0.3 to 1.0.0.4. Then, uninstall/install the extension again and it should work. Let me know how you go.

@animaux animaux changed the title Upgrading an »official« 2.7.10 installation ~~Upgrading~~ Transfering an »official« 2.7.10 installation Sep 15, 2021
@animaux
Copy link
Author

animaux commented Sep 15, 2021

Many thanks for explaining and patching! I have no idea of the workings of composer, but I found the same file with the long link options still lingers in the vendor folder on the site root folder (/vendor/pointybeard/helpers-functions-files/src/Files/Files.php).

After switching that to short options, Classic Fields did install! \o/

@pointybeard
Copy link
Owner

Awesome! If your composer directory isn't updating, try deleting /vendor and then composer update --no-dev --no-cache. That might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants