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

Error saving to J4 #43

Open
camminateinfriuli opened this issue Apr 20, 2023 · 5 comments
Open

Error saving to J4 #43

camminateinfriuli opened this issue Apr 20, 2023 · 5 comments

Comments

@camminateinfriuli
Copy link

When I select the track from the additional field and save the article exits the article edit and returns to the administration panel with Unknown format specifier "T" error.

aggpx3

The "T" to which the error refers is the one highlighted by the arrow in the image above.

aggpx1

The article is saved but the error persists and if I don't manually edit the trace in the backend it gives the same error again.

aggpx

@astridx
Copy link
Owner

astridx commented Apr 20, 2023

Can you try to save the gpx-file without a space in the name of the file please?

@camminateinfriuli
Copy link
Author

Yes if there are no spaces in the track name it works.

@camminateinfriuli
Copy link
Author

Can't solve the error while using gpx tracks with spaces or other special characters?

Thanks Gianni

@astridx
Copy link
Owner

astridx commented May 3, 2023

This is not a bug. File names with special characters are not supported by this extension.

@camminateinfriuli
Copy link
Author

This is not a bug. File names with special characters are not supported by this extension.

I seem to have solved the problem but it needs to be tested by modifying /httpdocs/plugins/fields/aggpxtrack/tmpl
the aggpxtrack.php file

I replaced lines 29 to 31
29 if (str_contains($value_raw, '#joomlaImage:')) {
30 $value = (array) substr($value_raw, 0, strpos($value_raw, '#joomlaImage:'));
31 }

with:
29 if (str_contains($value_raw, '#joomlaImage://local-')) {
30 $value = (array) substr($value_raw, strpos($value_raw, '#joomlaImage://local-')+21, strlen($value_raw));
31 }

With this replacement it works for me without changing anything else, but I don't know if making partial use of the extension causes other problems, now in my case you can also select gpx files that have the space between the words for example "Berlin to Paris.gpx ", you select the track and now it saves regularly.

I will do a test period, albeit partial.

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