givanz / Vvveb

Powerful and easy to use cms to build websites, blogs or ecommerce stores.
https://www.vvveb.com
GNU Affero General Public License v3.0
239 stars 49 forks source link

SEO plugin does not work #82

Open lilianzzz opened 4 months ago

lilianzzz commented 4 months ago

SEO plugin does not work. Apparently it is not installed correctly? checked in a clean environment

image

https://github.com/givanz/Vvveb/assets/24529543/2252cdf9-5801-4e87-961d-e5a139abc7d5

givanz commented 4 months ago

SEO Plugin currently has only post meta configuration, after enabling the plugin you should see a new tab on post/page edit page.

Site SEO configuration schema markup and other features are in development and will be available in a few days.

I fixed some bugs in the plugin and removed the plugins menu entry until the plugin settings page is finished.

The update is available in latest.zip

lilianzzz commented 4 months ago

I did a lot of experiments, it is displayed correctly on a clean site, but the old one with rolling out changes from latest.zip and saving the old /public/themes/blink-coming-soon , see screenshot. image

In any case, thank you very much for your work. I'll look forward to updates

givanz commented 4 months ago

There are some changes for seo plugin that need templates to be regenerated, make sure that you clear cache after updating files from latest.zip

You can clear template cache or all cache from admin > tools > cache or by manually deleting them from storage/compiled-templates/.

Let me know if it still doesn't work.

I will let you know when the plugin is ready with site settings and schema support.

lilianzzz commented 4 months ago

I found out what the problem was - in /config/sites.php ID = 1 was set, although I had a working ID 2 (apparently at the very beginning of the experiments I deleted the site with ID 1)

Now everything works fine =) Thank you very much.

lilianzzz commented 4 months ago

small upd - if activate SEO Optimization ( Vvveb from February 16) and move in left menu Pages- Pages - Add page or move in left menu Posts- Posts - Add post

page error:

(error 500)
SQL file /home/d/dissokdf/***/public_html/admin/sql/sqlite//post_content_meta.sql does not exist for Sql\Post_content_metaSQL!

/home/d/dissokdf/***.ru/public_html/system/core/startup.php on line 165
Code
throw new \Exception("SQL file $sqlFile does not exist for $relativeClass!"); // <==

        }

        $file       = DIR_STORAGE . 'model' . DS . APP . DS . $name . '.' . DB_ENGINE . '.php';

        $fileExists = file_exists($file);

        if (SQL_CHECK || ! $fileExists) {

            if (! file_exists($sqlFile)) {

                throw new \Exception("SQL file $sqlFile does not exist for $relativeClass!");    // <==

            }

            //if the file has not been generated yet or sql files is changed recompile

            if (! $fileExists || ((filemtime($sqlFile) > filemtime($file)))) {

                regenerateSQL($sqlFile, $file, $modelName, $namespace);

                $fileExists = true;

            }

Trace
#0 /home/d/dissokdf/***.ru/public_html/system/functions.php(973): Vvveb\System\Core\autoload('Vvveb\\Sql\\Post_...')
#1 /home/d/dissokdf/***.ru/public_html/system/meta/meta.php(47): Vvveb\model('post_content_me...')
#2 /home/d/dissokdf/***.ru/public_html/system/meta/meta.php(42): Vvveb\System\Meta\Meta->__construct()
#3 /home/d/dissokdf/***.ru/public_html/system/functions.php(142): Vvveb\System\Meta\Meta::getInstance()
#4 /home/d/dissokdf/***.ru/public_html/plugins/seo/plugin.php(56): Vvveb\get_multi_post_content_meta(false, 'seo')
#5 [internal function]: SeoPlugin->get(Array, false)
#6 /home/d/dissokdf/***.ru/public_html/system/event.php(75): call_user_func_array(Array, Array)
#7 /home/d/dissokdf/***.ru/public_html/admin/controller/content/edit.php(253): Vvveb\System\Event::trigger('Vvveb\\Controlle...', 'index', Array, false)
#8 [internal function]: Vvveb\Controller\Content\Edit->index()
#9 /home/d/dissokdf/***.ru/public_html/system/core/frontcontroller.php(229): call_user_func(Array)
#10 /home/d/dissokdf/***.ru/public_html/system/core/frontcontroller.php(298): Vvveb\System\Core\FrontController::call('Vvveb\\Controlle...', 'index', '/home/d/dissokd...')
#11 /home/d/dissokdf/***.ru/public_html/system/core/frontcontroller.php(364): Vvveb\System\Core\FrontController::redirect('Content/Post', 'index')
#12 /home/d/dissokdf/***.ru/public_html/system/core/startup.php(355): Vvveb\System\Core\FrontController::dispatch()
#13 /home/d/dissokdf/***.ru/public_html/index.php(138): Vvveb\System\Core\start()
#14 /home/d/dissokdf/***.ru/public_html/admin/index.php(41): include('/home/d/dissokd...')
#15 {main}
givanz commented 4 months ago

I think that in a previous update admin/sql/sqlite/post_content_meta.sql was missing, it is included in recent updates.

Please redownload latest.zip and update admin/sql folder.

For SEO plugin there is still some work to be done mostly on structured markup schema.