Page not found
-
Hi,I seem to have one issue left.
After finishing a post on front-end, clicking on ‘Save’ leads to ‘Page not found’.
Clicking on ‘Save and return’ and ‘Save and preview’ works fine.
Any ideas?
-
Hi,
Can you tell me what you did to fix the translation issue with WPML, so I can put it in FAQ – Thanks
For your issue with save, not really, but 2 things you could check:
1: That the right page is set in Frontier Settings (Page containing [frontier-post] shortcode:)
2: If that doesn’t work, try and save your permalinks (Admin menu/Settings/Permalinks) – You don’t need to change anything, just hit saveLet me know how it goes
Hi Finnj,
for WPML. I use the Login widget AFO on the front-end. When logged in, the user is redirected to the page ‘My messages’ which contains the [frontier-post] shortcode. I translated that page in French, so from the language-changer in the menu the user can choose the French page. There the French categories show up (on the English page just the English categories). Problem solved.
For the save-button: I understand now why ‘Page not found’ is displayed, as in the Frontier Post Settings ‘Page containing [ frontier-post] shortcode’ is set to none. There seems to be no other way as I don’t want the user to return to English when he is in the French version of the site.
So I think the only solution is to get rid of the Save button and leave the other two. Would that be possible? I hope you understand my explanation.
Yes I believe I understand your problem.
First, WPML should be able to teanslate Frontier Post plugin, but it requires some work in WPML.
To solve it in Frontier Post, you have 2 options as I see it:
In frontier_form.php in the forms directory comment out the line containing user_post_save with
<!-- -->the line is at the end in the file – in this case it will be overwritten on plugin updateAlternatively you can copy the frontier_form.php to the template directory as described under FAQ, and then change it – if you are reasonable with php you would be able to have to files, an english and a french, and then load the correct one using include() function
The change you need to do is:
Change the following line (line 160) from: <button class="button" type="submit" name="user_post_save" id="user_post_save" value="save"><?php _e("Save", "frontier-post"); ?></button> to: <!-- <button class="button" type="submit" name="user_post_save" id="user_post_save" value="save"><?php _e("Save", "frontier-post"); ?></button> -->the alternative using templates – Needs some coding experience:
Navigate to ./wp.content/themes/[your active theme]/
check if ./wp.content/themes/[your active theme]/plugins/frontier-post/ exists, if not create itcopy the frontier_form.php to the new directory, and make 2 additional copies:
– english.frontier_form.php
– french.frontier_form.phpedit frontier_form.php
delete all content between the php start and end tags and insert:
if (ICL_LANGUAGE_NAME_EN == "French") { include_once(frontier_load_form("french.frontier_form.php")); } else { include_once(frontier_load_form("english.frontier_form.php")); }In theory it should work, but hasn’t been tested.
If this work you can do the same with frontier_list.php
Hi Finnj,
thank you very much!
First I tested your first option. That works fine in both languages.
Do I understand right that this option is overwritten in case of an update and the second option not?Yes
The topic ‘Page not found’ is closed to new replies.